The Flight of the Conchords star's track 'Man or Muppet' from The Muppets movie triumphed over Sergio Mendes, Carlinhos Brown and Siedah Garrett's 'Real in Rio' from animated feature Rio.
McKenzie said: "I grew up in New Zealand watching The Muppets on TV and never dreamed I'd get to work with them. I was genuinely starstruck when I finally met Kermit the Frog, but once you get to know him he's just a normal frog - and, like many stars here, he's shorter in real life."
The actor - who will soon appear in The Hobbit - thanked director James Bobin and the song's producer Mickey Petralia, before paying tribute to Disney "for making movies with songs in them".
McKenzie also thanked his wife and family "for all their love and support" and expressed his gratitude to his parents "for never telling me to get a real job".
Finally, he thanked original Muppets creator Jim Henson, saying: "It's truly an honour to work in the shadow of such legends."
The 84th Academy Awards continue on ABC in the US and Sky Movies in the UK.
More from the Oscars 2012:
> Oscars: Academy Awards 2012: Red carpet pictures
> Oscars 2012: 84th Academy Awards live blog
> Oscars 2012: Octavia Spencer wins 'Best Supporting Actress' for 'The Help'
> Oscars: Sacha Baron Cohen spills Kim Jong Il's 'ashes' on Ryan Seacrest
> Oscars 2012: Academy Awards winners list in full
Watch the music video for 'Man or Muppet' below: