Two goals in three second-half minutes put the Minstermen on their way to victory at the rock-bottom Cobblers as they made it three wins on the bounce.
Both side had failed to win in December but it was York who came out on top to leave Northampton looking up and with a real fight to stay in the Football League.
King said: "I'm very disappointed, we've just lost a game of football that we needed to win.
"We played some decent football at times but we didn't create enough chances and it's goals which win games and we didn't have enough in front of goal.
"In fairness, there wasn't a lot of creativity at either end but we didn't look the same bunch of players that did so well for me in the last couple of games, I thought they were trying to play perfect football at times but we're not in a position to do that.
"We didn't have the urgency or the edge, I don't know if it was because we were playing at home or what it was.
"But we're in a dogfight and I don't think we had enough urgency in our game.
"We showed flashes at times but we weren't effective enough in the box. I need to reflect on the performance but we're back to square one now and the defeat means we've got to go to Torquay and win now."