The song was recorded by Pitbull – who also participated in writing it along with Marc Kinchen, Adrian Trejo and Urales Vargas – and it will start being played by radio stations March 26.
"It’s an incredible honour to be a part of such an amazing franchise as ‘Men in Black’ and I have so much respect for Will Smith, especially with our similar musical backgrounds," Pitbull, whose real name is Armando C. Perez, said in a statement.
Besides appearing in the films, Smith recorded the theme songs for "Men in Black" and "Men in Black II".
For "Back in Time", Pitbull sampled Mickey & Sylvia’s 1950s hit "Love is Strange".
"Men in Black 3" will begin showing in the US May 25, a decade after the second movie in the saga collected more than $440 million at box offices worldwide.
The film’s director, Barry Sonnenfeld, said that it was his 19-year-old daughter who introduced him to Pitbull’s music.
"Men in Black 3" will feature the same main characters – Agents J (Smith) and K (Tommy Lee Jones) – from a fictional secret organization devoted to policing and monitoring extraterrestrial activity on Earth. In the new film, J and K will once again be dispatched on a new mission to save the planet.