The former Railway Minister was accompanied by wife Rabri Devi, two sons and a daughter on his visit to the temple, where he performed an 'abhishek' and did the 'kaalsarp' pooja.
The family might also visit Saibaba temple later in the evening, party sources said.
Yadav's RJD recently won the Maharajganj Lok Sabha bypoll by a convincing margin of over 1.37 lakh votes where party candidate Prabhunath Singh defeated JD(U)'s P K Shahi.