Srimad Bhagavatam Canto 06, Chapter 01, Text 40

SB 6.1.40

yamaduta ucuh
veda-pranihito dharmo
 hy adharmas tad-viparyayah
vedo narayanah saksat
 svayambhur iti susruma
Translation by His Divine Grace A. C. Bhaktivedanta Swami Srila Prabhupada: 
The Yamadutas replied: That which is prescribed in the Vedas constitutes dharma, the religious principles, and the opposite of that is irreligion. The Vedas are directly the Supreme Personality of Godhead, Narayana, and are self-born. This we have heard from Yamaraja.
Purport by His Divine Grace A. C. Bhaktivedanta Swami Srila Prabhupada:  
The servants of Yamaraja replied quite properly. They did not manufacture principles of religion or irreligion. Instead, they explained what they had heard from the authority Yamaraja. Mahajano yena gatah sa panthah: one should follow the mahajana, the authorized person. Yamaraja is one of twelve authorities. Therefore the servants of Yamaraja, the Yamadutas, replied with perfect clarity when they said susruma (“we have heard”). The members of modern civilization manufacture defective religious principles through speculative concoction. This is not dharma. They do not know what is dharma and what is adharma. Therefore, as stated in the beginning of Srimad-Bhagavatam, dharmah projjhita-kaitavo ’tra: dharma not supported by the Vedas is rejected from srimad-bhagavata-dharma. Bhagavata-dharma comprises only that which is given by the Supreme Personality of Godhead. Bhagavata-dharma is sarva-dharman parityajya mam ekam saranam vraja: one must accept the authority of the Supreme Personality of Godhead and surrender to Him and whatever He says. That is dharma. Arjuna, for example, thinking that violence was adharma, was declining to fight, but Krsna urged him to fight. Arjuna abided by the orders of Krsna, and therefore he is actually a dharmi because the order of Krsna is dharma. Krsna says in Bhagavad-gita (15.15), vedais ca sarvair aham eva vedyah: “The real purpose of veda, knowledge, is to know Me.” One who knows Krsna perfectly is liberated. As Krsna says in Bhagavad-gita (4.9):
janma karma ca me divyam
 evam yo vetti tattvatah
tyaktva deham punar janma
 naiti mam eti so ’rjuna
“One who knows the transcendental nature of My appearance and activities does not, upon leaving the body, take his birth again in this material world, but attains My eternal abode, O Arjuna.” One who understands Krsna and abides by His order is a candidate for returning home, back to Godhead. It may be concluded that dharma, religion, refers to that which is ordered in the Vedas, and adharma, irreligion, refers to that which is not supported in the Vedas.
Dharma is not actually manufactured by Narayana. As stated in the Vedas, asya mahato bhutasya nisvasitam etad yad rg-vedah iti: the injunctions of dharma emanate from the breathing of Narayana, the supreme living entity. Narayana exists eternally and breathes eternally, and therefore dharma, the injunctions of Narayana, also exist eternally. Srila Madhvacarya, the original acarya for those who belong to the Madhva-Gaudiya sampradaya, says:
vedanam prathamo vakta
 harir eva yato vibhuh
ato visnv-atmaka veda
 ity ahur veda-vadinah
The transcendental words of the Vedas emanated from the mouth of the Supreme Personality of Godhead. Therefore the Vedic principles should be understood to be Vaisnava principles because Visnu is the origin of the Vedas. The Vedas contain nothing besides the instructions of Visnu, and one who follows the Vedic principles is a Vaisnava. The Vaisnava is not a member of a manufactured community of this material world. A Vaisnava is a real knower of the Vedas, as confirmed in Bhagavad-gita (vedais ca sarvair aham eva vedyah).
Srimad Bhagavatam Canto 06, Chapter 01, Text 39
Srimad Bhagavatam Canto 06, Chapter 01, Text 41