Israeli police spokeswoman Luba Samri said the attackers first opened fire at a bus in Ramot, a settlement neighbourhood of Jerusalem.
The shooters opened fire again near Jerusalem's Old City, Xinhua news agency reported.
The attackers were killed when police fired back.
Samri said a civilian in his fifties was critically wounded, apparently by Israeli fire, as police tried to subdue the assailants.
She said the assailants were in their 20s.