The killings in Wardak province, which lies close to the capital Kabul, underline Afghanistan's fragile security situation as President Ashraf Ghani holds talks in Washington.
With the spring fighting season about to begin, Ghani has asked the US for "flexibility" as it pulls out its remaining 10,000 troops by the end of 2016.
Ataullah Khogyani, the spokesman for the provincial governor, told AFP a group of gunmen opened fire on a bus in Wardak around 1:00 am, killing 13 people including one woman.
Mohammad Ali, the deputy governor of neighboring Ghazni province, confirmed the incident, and said the gunmen picked their victims and shot them one by one.
More From This Section
Both officials said the motive for the attack was still under investigation.
Last month, masked gunmen abducted 30 Shiite Muslims from the Hazara ethnic group from a bus in Zabul province. They have still not been recovered.
NATO ended its combat operation against the Taliban in December after 13 years of war, leaving Afghan forces to deal with the militants themselves.
But there have been fears that without the military muscle of the US-led NATO coalition behind them, Afghan forces could struggle to quell a still-resilient insurgency.
The Pentagon insists Afghan forces are holding their own in the fight, but senior US officers have voiced concern that they are sustaining casualties at an "unsustainable" rate.
The United States was due to reduce its 10,000 troops to 5,500 by December, but that number is expected to be reassessed after American commanders appealed to keep more troops on the ground.
But efforts are proving difficult despite Ghani's attempts to get influential regional powers like Pakistan on board, as the Taliban continue to impose tough conditions for negotiations.