The 79-year-old Rahman, the nominee of the Awami League, was the lone candidate for the presidency after the expiry of the last date for nomination paper withdrawal on Wednesday.
"Mohammad Zillur Rahman has been elected the President of the Peoples Republic of Bangladesh under Clause 7 of the President Election Act 1991," Chief Election Commissioner A T M Shamsul Huda said in an announcement.
Huda said Rahman was declared the country's 19th President as his nomination was found valid and no other candidate filed papers for the presidency.
Meanwhile, Bangabhaban presidential palace officials said that the swearing-in ceremony of the new President would be held on Thursday at 7 pm at the Darbar Hall, where Chief Justice M Ruhum Amin would administer the oath of office to him.
Rahman, who succeeds Iajuddin Ahmed, expressed his desire to work neutrally for the welfare of his countrymen.
"I will work for the people neutrally, even though I will be away from active politics," Rahman, who joined politics in his student life, told media persons at his residence.
Will not allow anti-India activities:B'desh
India, Bangladesh ink trade deals