The humorous spot by Cheil UK shows Corden playing two roles – one as himself as the star of an ad for the phone and as Wilf, a bearded hipster director who is obsessed with creating a stylistic film.
It begins with Corden dressed in a suit talking about the battery life of the phone, when the director yells, "Cut, James please. People don’t care about battery, image is everything".
There are several takes as the director turns the lights down and brings in dancers.
Russell Taylor, the chief marketing officer at Samsung Electronics UK and Ireland, said: "The new Galaxy S6 is the most important phone launch for Samsung this year.
"Because of this, we need a way to communicate not only the design and quality of the two phones and their innovative features, but also entertain and engage our customers.
"We feel we have really captured this, and our brand personality that comes across via this content is humorous, tongue-in-cheek and timely – with the use of man of the moment James Corden."
Media planning was handled by Starcom MediaVest.
Matt Pye, chief operating officer at Cheil UK, said: "James is real hot property right now, following his star turn as the host of The Late Late Show in the US.
"He’s king of the latest viral videos, and it made perfect sense to use his unique comedy gifts, personality and charisma to launch Samsung’s most revolutionary smartphones to date.
"The video is fun, engaging and shareable and will give the S6 some serious clout on launch day."