The 31-year-old scored 15.691 points, with Russian Denis Ablyazin taking silver with 15.516 and Kenzo Shirai of Japan securing bronze with 15.449.
As other North Korean Olympic medalists have done so far, Ri dedicated his victory to the country's leader, Kim Jong-un.
"It does not mean anything to me".
"This gold medal is a joy for my country and I think it will bring a sense of victory and courage to the people of my country", said Ri, who described it as the greatest moment of his career. "This gold medal is joy for my country". I had the confidence that I could win.
In his first appearance at the Summer Games, Ri Se Gwang took the top prize Monday after earning an average score of 15.691, Yonhap reported. "I wanted to win this gold medal for all the love I have received from my country".
Ri's victory is not only the second gold medal for Pyongyang in 2016 - Rim Jong-sim won in women's weightlifting - but also the second gold medal for North Korea in men's gymnastics.
Shirai's score was the same as Romania's Marian Drăgulescu, but Shirai's individual vault score was higher than Drăgulescu's, knocking him off the podium into fourth place.