Villa will play out the rest of the season before calling time on his career when his current contract ends.
He made the announcement in a tweet on his official Twitter page on Tuesday night.
"Thank you to all the teams, coaches and team-mates that have allowed me to enjoy this dream career".
Villa retires as Spain's all-time leading goalscorer, with 59 goals in 98 appearances, and played a key role in the nation's historic 2008 UEFA European Championship- and 2010 World Cup-winning sides.
"My goal is to put the icing on it by winning the Emperor's Cup on @visselkobe January 1".
"It's better to leave football before football leaves me", he told a news conference speaking in Spanish. "Thank you for all the love".
Villa later spent four seasons with New York City and had a brief spell at Melbourne City before heading to Japan. His time at Barcelona saw him become a Champions League victor, under the leadership of Pep Guardiola, scoring the opening goal in a 3-1 victory over Sir Alex Ferguson's Manchester United.
Villa was sold by Barcelona to Atletico Madrid in 2013 where he won his third La Liga title, scoring 13 league goals in 36 games to help Los Colchoneros win their first league title since 1996. He scored 12 goals this season for Kobe, a decent scoring output for a struggling club.