The former Arsenal and West Ham striker, capped 51 times by Wales, accepted the role with Chris Coleman and the national side in July last year.
Hartson said he had no regrets about taking on his role with Wales and claimed the experience had been been a learning curve for him.
"I have enjoyed every moment of my time with Wales," Hartson said. "Everyone knows how passionate I am about my country."
"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 and Osian," he added. "I wish them and the players all the best for the future and really hope they qualify for the UEFA European Championships in 2016."
Football Association of Wales chief executive Jonathan Ford added: "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."