Rabbani was head of the country's High Peace Council, which was set up by the Afghan government to work toward a political solution with the Taliban.
The turban bomber entered Rabbani's house in the evening and blew himself up inside, said Mohammad Zahir, the chief of criminal investigation for the Kabul police. Fazel Karim Aimaq, former lawmaker from Kunduz province and a friend of Rabbani's, told reporters outside the former president's home that a man who arrived to meet Rabbani was not properly searched. The visitor shook Rabbani's hand and bowed as a sign of respect, Aimaq said.
"Then his turban exploded," he said.
Four of Rabbani's bodyguards were also killed and a key presidential adviser was wounded in the attack at Rabbani's home.
President Barack Obama says the killing will not deter the U.S. and Afghanistan from its mission of freedom.
Current Afghan President Hamid Karzai is cutting short his trip to New York and is returning to Kabul after a meeting with Obama.
The Associated Press contributed to this report.