The ex-international striker served under Chris Coleman during the recent and unsuccessful World Cup qualifying campaign, and has cited other commitments as a reason why he cannot continue in the role.
"I have enjoyed every moment of my time with Wales. Everyone knows how passionate I am about my country," the former Arsenal and Celtic striker, who scored 14 times in the national shirt, said.
"The work I now do as a pundit for the BBC is taking up more and more of my time.
"With another child on the way I need to spend some time with my growing family. I have learnt a lot working with Chris, Kit (Symons) and Osian (Roberts).
"I wish them and the players all the best for the future and really hope they qualify for the UEFA European Championships in 2016."
Coleman's own future remains up for debate. The 43-year-old's contract expires after next weekend's friendly with Finland and he has been heavily linked with the vacant position at former club Crystal Palace.
His situation will be discussed with FAW chief executive Jonathan Ford, who acknowledged Hartson's resignation.
Ford said: "We fully understand the reasons behind John's decision. We are all aware of his passion for Welsh football and hope that he can continue to play a role in the development of the game in Wales at all levels."