The victims were the wife and mother-in-law of a U.S. Embassy employee, embassy spokesman Robert Kerr said, without providing further details.
"This a horrible event," he said. "These were people who loved Kenya."
The gunmen "ordered the two women out but they hesitated," said Isaiah Osugo, a criminal investigations officer in Nairobi. "Then they were shot."
Kenyan police later killed two people involved in the carjackings, police spokesman Gideon Kibunja said. He could not immediately provide more details.
Officials withheld the women's names.
Francis Munyambu, Nairobi's deputy provisional police officer, said the carjackers escaped with the embassy vehicle and were armed with Kalashnikov assault rifles.
Earlier in the day, the men had carjacked Michael Madine along the same road, according to police and Madine. Madine spoke to The Associated Press at the scene after being interviewed by police.
"Four men with AK-47s carjacked me," he said in Swahili. He said one of the carjackers stayed in the car with him while the others attacked the embassy vehicle.
"I heard one of the women screaming and then I heard three gunshots," Madine said. The carjackers then fled, he said.
The shooting happened just off a highway in Kinoo, about 12 miles outside Nairobi. An Associated Press reporter at the scene saw two pools of blood on the roadside.
Shortly after Munyambu's news conference, two men who identified themselves only as officials from the U.S. Embassy ordered reporters to leave the scene and took journalists' pictures, threatening to ban them from the embassy.
Carjackings are common in and around Nairobi, but Saturday's attack was unusually brazen because it took place during the day. In September, the chief U.S. military attache was shot and seriously wounded in a carjacking in Nairobi. Russia's ambassador was stabbed in a robbery on Aug. 20. A month earlier, a Danish diplomat was attacked and robbed.
Kenya's government spokesman, Alfred Mutua, said officials believe Saturday's violence was "a random attack." He did not provide further details.