Mehboob Asif, 36, who works at the visa section of the Pakistan embassy, was injured in his stomach and hand when he was shot near the office on Thursday morning, police said.
He was rushed to hospital where he was declared "out of danger."
"The gunman, who followed Asif, fired three bullet rounds and fled the scene on the victim's motorbike," Kathmandu police chief Pushkar Karki told AFP.
Police said they were investigating the shooting and had no idea yet who was responsible.
"The embassy of Pakistan is confident that the government of Nepal would undertake investigations at appropriate levels to bring the criminals to justice," the embassy said in a statement.
The shooting of the visa officer came amid a wave of attacks in Kathmandu by unidentified assailants that has fuelled concern over public security.
Earlier this week, a businessman was shot dead in the centre of the city and the country's new energy minister was stabbed by two assailants just hours after he was appointed.
Police say they do not know yet who was responsible for those two attacks.