Scheel died on Aug 24 at the age of 97 following long illness.
The foreign ministry said Ali signed the condolence book placed at the German embassy in Dhaka on Monday.
“On behalf of the Government and the people of Bangladesh, I express deep shock and heartfelt condolences at the sad demise of [Mr.] Walter Scheel, former President of the Federal Republic of Germany,” he wrote.
“On this sad day, we recall with deep appreciation the significant contribution of the President Walter Scheel in shaping the future of Germany. He will also be remembered for his work to humanise his country’s image abroad, helping to dispel national stereotypes.”
“On this sorrowful occasion, we pray for salvation of the departed soul and convey deep sympathy to the bereaved family and the friendly people of the Federal Republic of Germany,” the foreign minister wrote.