King was Aidy Boothroyd's assistant and was placed in temporary charge when the former Watford and Coventry boss was sacked just before Christmas.
Wilder took over at Sixfields on Monday and King has decided to end his two-year association with the Cobblers.
"We are disappointed that Andy has chosen to leave but we wish him well," said Northampton chairman David Cardoza.
"He did a very good job in difficult circumstances over the last few weeks, and he conducted himself with great dignity and in good humour.
"He is a real football man and a very genuine and honest man. He met with Chris Wilder and Alan Knill and typical of the man, he decided it would be better for Chris and Alan to start with a clean slate and so he felt it would be best to leave.
"We are disappointed but we fully respect his decision."
King leaves with Northampton sat bottom of Sky Bet League Two ahead of Tuesday night's clash with Rochdale.
- Sports & Recreation