Ousted members of the former government - including toppled leader Saddam Hussein - were allowed to watch the event on Wednesday on television in their prison cells, Iraqi officials said.
Shia Adil Abd al-Mahdi and current interim President Ghazi al-Yawir, a Sunni Arab, were chosen as Talabani's two vice-presidents.
After weeks of negotiations, the three were the only candidates and received a total of 227 votes. Thirty ballots were left blank.
The announcement that Talabani won drew applause, and many lawmakers crowded around him to offer congratulations. He was expected to be sworn in on Thursday.
"This is the new Iraq, where no sect or minority controls the whole country," Parliament Speaker Hajim al-Hasani said. "It is an Iraq where all the people are unified."
Talabani said he would work to secure his troubled nation and pledged "to establish an independent and united Iraqi state based on democracy, federalism and human rights".
"We will spare no effort to present Iraq as a model of democracy ... . We hope to consolidate national unity ... regardless of religious and sectarian backgrounds," he said.
Talabani called on neighbouring countries to prevent foreign fighters from crossing into Iraq.
"Our people are patient," he said. "But there's a limit to their patience."
The Kurdish-led coalition won 75 of the 275 parliament seats in the 30 January elections, a major victory for a group that spent years fighting Saddam Hussein's government.
Human Rights Minister Bakhtiyar Amin said lawmakers had asked that the ousted president and other jailed members of his former government be shown the process.
"This is a very important session because this is the first time in Iraq's history that the president and his deputies are elected in a legitimate and democratic way by
the Iraqi people"
Ruwsh Nuri Shaways,
"There will be televisions there, and they will be seeing it today," he said.
Captured in December 2003, the former president has been in custody with several of his top men at a US-guarded detention facility.
"This is a very important session because this is the first time in Iraq's history that the president and his deputies are elected in a legitimate and democratic way by the Iraqi people," interim Vice-President Ruwsh Nuri Shaways said.
"That's why the Iraqi government thought it would be beneficial that the former dictator see this unique process."
The interim National Assembly must write a permanent constitution by 15 August.
The constitution, along with elections for a permanent government scheduled for December, are all central parts of the US government's eventual pullout.
On Thursday, lawmakers plan to name Shia leader Ibrahim al-Jafari prime minister. Lawmakers have also started discussions on candidates to serve in the cabinet.
In related news, the US military said in a statement on Wednesday that a Task Force Baghdad soldier was killed a day earlier when his patrol was hit by a bomb.