His rival, former Lok Sabha speaker P.A. Sangma, was way behind with 239,966 votes as counting continued.
The win was anticipated as Mukherjee had the backing of the Trinamool Congress, the Rashtriya Janata Dal, the DMK, the Forward Bloc and Samajwadi Party but also National Democratic Alliance (NDA) ally Janata Dal-United and Shiv Sena.
Officials opened the ballot boxes in Room 63 of Parliament House with representatives from both candidates present.
The first wooden box that was opened contained the votes of MPs cast in Delhi Thursday when the election took place.
Mukherjee will be administered the oath of office by the Chief Justice of India on July 25 at the Central Hall of Parliament.
The contest was between UPA candidate Pranab Mukherjee and opposition-supported Purno Sangma, a former Lok Sabha speaker.
The odds were heavily stacked against Sangma the man who has never lost any election from 1977 till 2008. And Sanga's defeat to Mukherjee, would mean that for the first time in 35 years that he would be left without any 'current' designation.
Ever since he threw his hat into the presidential ring, Sangma has been clinging on to the 'conscience vote', 'miracle' and 'hope' rhetoric.
Sangma had indubitably brought in an element of excitement into the 2012 presidential poll which even made former Uttar Pradesh chief minister Mulayam Singh Yadav fumble during Thursday's poll, rendering his vote invalid'.
The counting of ballots were conducted amidst tight security in Parliament House in the presence of authorised representatives of both Mukherjee and Sangma. The ballot boxes of votes cast in Parliament House were taken up first for counting after which those from the states were opened.
Pranab Mukherjee's win will bring an end the lament of Bengalis of not seeing a local boy occupying the highest constitutional post of the country.
Mukherjee, often referred to as the best Prime Minister India never had, began his political career in 1969 and has served in every Congress cabinet since Indira Gandhi was Prime Minister.
Trinamool Congress (TMC), Rashtriya Janata Dal (RJD), JD (S), CPI-M, YSR Congress and Forward Bloc have also extended their support to Mukherjee along with NDA partners Janata Dal-United and Shiv Sena.
About 95 percent of the 4,896 electorate exercised their franchise to elect India's 13th president at polling centres set up at Parliament House and 30 state and union territories.
The president is elected by an electoral college of MPs and members of state assemblies.
All MPs except those nominated to parliament are eligible to vote. There are 776 MPs; each MP's vote equals 708 votes.
There were 4,120 assembly members eligible to vote. The value of a legislator's vote is variable depending on the population of the state the member represents.
Besides the support of the UPA led by the Congress, Mukherjee enjoyed the backing of the Samajwadi Party, Bahujan Samaj Party, Rashtriya Janata Dal and Janata Dal-Secular.
Constituents of the Bharatiya Janata Party-led National Democratic Alliance, Janata Dal-United and Shiv Sena, also extended their support to the former finance minister besides the CPI-M and Forward Bloc.
Sangma, a member of the Meghalaya assembly, is supported by the BJP, Akali Dal, Asom Gana Parishad, Jharkhand Mukti Morcha, AIADMK and Biju Janata Dal.
P.A. Sangma, a former Lok Sabha Speaker, jumped into the fray playing the tribal card with the initial support of the Biju Janata Dal (BJD) and the All India Anna Dravida Munnetra Kazhagam (AIADMK).
The BJP and Akali Dal decided to back Sangma, who quit the NCP, the party he founded with Sharad Pawar, to contest the election.