Kotsenburg's stylish run earned him 93.50 points from the judges which proved enough to claim the first Olympic gold in the event, which is making its debut in Sochi.
"I'm really excited," he said. "It feels awesome. I don't know what to call it. I have no idea what's actually going on. This is the craziest thing that ever happened."
Staale Sandbech nailed his second run to snatch the silver medal for Norway with 91.75, while Canadian Mark McMorris, who was awarded 88.75 for his second run despite riding with a broken rib, took the bronze.
There was a nervous wait for all three when the score for the final competitor, world number one Max Parrot, was delayed but his 87.25 was only good enough for fifth place.
When the Canadian's score finally flashed up on the big screen, the three 20-year-old medallists hugged each other and waved flags to the delight of a big crowd bathing in the sunshine at the Rosa Khutor Extreme Park.
Kotsenburg, who was all creative grabs and smooth landings in his brilliant first run, undoubtedly benefited from judging which has favoured style over big jumps this week.
His first run was the third of the day but nobody was able to overtake him for the remainder of the contest with Sandbech coming closest with the penultimate charge down the hill of the day.
The slopestyle was brought into the Games as part of an initiative to attract a younger demographic and there could not have been a better advert for the sport than the first final.
The fans in the stands jigged to pumping rock music as the competitors performed their spectacular tricks against a backdrop of snowcapped mountains and the brightest of blue skies.
Jamie Nicholls secured Great Britain's best Winter Olympic finish in a snow sport in 46 years with a sixth place finish.
Team-mate Billy Morgan also made the final with a brilliant qualifying performance in the semis, posting a 90.75 score that would have been good enough for bronze when it mattered.
But he failed to land tricks on both his final runs, despite getting fans off their feet with a massive triple on the final jump of his first run.