The ruling coalition of the JD(U), BJP and others got 131 votes while the opposition got 108 votes, Speaker Vijay Kumar Chowdhury said.
The trust vote was taken through lobby division.
The NDA had earlier submitted a list of 132 MLAs to the governor. These include 71 of JD(U), BJP 53, RLSP two, LJP two, HAM one and three Independents.
In the 243-member Bihar Assembly, the RJD has 80 MLAs, the Congress 27 and the CPI-ML has three.
After emerging victorious in the floor test, Deputy CM Suhil Kumar Modi said the "unnatural alliance died naturally."
Earlier, Tejashwi Yadav lashed out at Nitish and said everyone who voted in favour of Nitish has disrespected the people's mandate. He further said, "Nitish didn't have answers to questions risen by me".
"The whole drama was planned by Nitish and his intention was to join hands with BJP, using me as a reason" he said.
Speaking in the assembly Tejashwi Yadav said that "Nitish's move was a pre-planned strategy and he had planned everything over a period of 6 months".
He further attacked Nitish and said "If Nitish has strength, he would have sacked me than resigning himself".
Tejashwi thereafter went ahead and questioned Sushil Modi if he is feeling ashamed? Following which a ruckus was observed in the assembly.
After Tejashwi stopped talking, RJD MLAs created a lot of ruckus during Sushil Modi's address.
Post Modi's address, Nitish Kumar began his address. Giving a befitting reply to Lalu after all his allegations, Nitish said, "Power is for serving people, not for satisfying self".
The floor test began at 11am on Friday. Nitish will now have to prove that he has te majority in Lok Sabha to form the government.
Meanwhile, Rashtriya Janta Dal leader and former Deputy CM Tejaswhi Yadav had claimed stake to form a government stating that he has majority.
Even RJD Chief Lalu Yadav had claimed that they had majority in Bihar Assembly and therefore should be given a chance first to fom the government.
Lalu had also claimed that he would approach SC against Governor Ram Naik’s decision of letting Nitish to form the government.
Lalu further said “people of Bihar know what Nitish is upto”. He said “Bihar is an aware state”.
He further added saying, People are angry with Nitish’s move. “People in every nook and village are angry with his decision”.
Nitish further claimed that Nitish’s resignation was a conspiracy by Sushil Modi and Nitsih.
Slathing a sarcastic attack on CM he said, “Nitish’s grave wouldn’t have a pocket, but a jhola (bag). He called Nitish and opportunist and asserted that he inclines in the direction where he sees power.
(With inputs from Agencies)