The 22-year-old won with a total of 16.041, as USA's Danell Leyva claimed silver and Russia's David Belyavskiy took bronze.
World champion You Hao finished eighth, as China left the Rio gymnastics competition without a title.
It was the first time they have not won gold in the sport since 1980.
China boycotted the Moscow Games that year.
Verniaiev missed out on the all-around title by just 0.101 points after hopping forward when dismounting the high bar.
Subscribe to the BBC Sport newsletter to get our pick of news, features and video sent to your inbox.
Find out how to get into gymnastics with our special guide.
Ukraine's Oleg Verniaiev won Olympic gold on the parallel bars in Rio after narrowly missing out on the all-around title.