In his speech he mentioned that Britain was at its best when "helping to lead" a strong EU and membership made it a "bigger player" on the world stage.
Leave EU campaigners reacted angrily to his words, with Tory MP Dominic Raab dubbing him a "lame duck" president.
UKIP leader Nigel Farage commenting the statement of US President, emphasized that Mr Obama would not be in office "by the time we're out of the EU post-referendum" and trade deals would be in both countries' interests.