The rapper served as an executive producer of the movie about a high school football coach who tries to help his team overcome years of losses.
Diddy was thanked during acceptance speeches of Undefeated's director TJ Martin and producers, but the mogul later took to his own Twitter account to express his joy over the win.
"God is the greatest!!!! Thank you! Undefeated !!!!" he tweeted.
Diddy then added: "Dreams do come true!! Hard work pays off!!"
Undefeated joins previous Oscar winners Inside Job, Man on Wire, March of the Penguins and Bowling For Columbine in the 'Documentary Category'.
Diddy recently signed to produce a remake of Undefeated, which he has described as an "incredible project".
> P Diddy: 'Whitney Houston was full of joy'
> Jennifer Lopez: 'Diddy said he hated one of my early songs' - video
Watch an Undefeated trailer below:
View a picture gallery of all the red carpet arrivals from the 84th Academy Awards: