Prosecutors say Pecker's actions helped Trump deceive voters in the 2016 election
Speaker Shirin Sharmin Chaudhury administered the swearing-in of Habib at parliament on Tuesday afternoon, the Parliament Secretariat said.
Parliament Secretary Zafar Ahmed Khan moderated the brief ceremony.
Deputy Speaker Md Fazle Rabbi Miah, Chief Whip Noor-E-Alam Chowdhury and Whip Iqbalur Rahim were also present.
The Dhaka-18 constituency comprises Dhaka North City wards No. 1, 17, 43 to 54 in Uttara and the airport area. The seat fell vacant after the death of former home minister Sahara Khatun on Jul 9.
Habib won the by-election to the seat on Nov 12.