The attack on Sunday came less than two months after the West African country said it had foiled an attempted coup.
"They got out of a Mercedes and shot at the house. They machine-gunned three vehicles in front of the building," a police officer on the scene said.
Diddahi Walad Abd Allah, the director of national security and a close confidant of the president, said he was not at home when the shooting happened (at about 0200 GMT). His wife and children were in the house but were not hurt, he added.
"Apparently it was a car, which did not have number plates, with four people on board who shot at my house," Walad Abd Allah told reporters in front of the single storey villa, surrounded by uniformed and plainclothes police officers.
Police were stopping taxis around the dusty capital - most of which are Mercedes cars - for spot checks, residents said.
President Taya has ruled with an
iron hand since his coup of 1984
The Muslim republic, a poor, mostly desert country hoping for riches from offshore oil, said in August it had foiled an attempted coup and blamed a group of renegade soldiers who had already made a similar attempt the year before.
It arrested 30 soldiers and civilians it suspected of planning to topple President Muawiya Walad Sidi Ahmad Taya while he was abroad on state business.
Taya, a pro-Western leader who took power in a 1984 coup and has brooked little dissent since then, crushed an attempted coup in June 2003 after two days of fighting in the capital. He locked up 131 accused plotters.
He has angered many Arabs in a nation straddling black and Arab Africans by shifting support towards the United States and Israel, with which it established full diplomatic relations in 1999, becoming only the third Arab League state to do so.