The South African looked to have the gold in the bag as he came off the bend in the lead and raced clear down the home straight, but Oliveira reeled him in to take gold in 21.45.
Pistorius, a Paralympic icon, came home second in 21.52, with stunned quiet from the 80,000 spectators greeting the result.
USA athlete Blake Leeper finished third to claim the bronze.
Today I'm entering into the history of the Paralympic GamesAlan Fonteles Cardoso Oliveira
Afterwards, Oliveira could not hide his delight. He said: 'Only my family, my friends, people next to me know what I've been through for being away from my family, training in Sao Paulo.
'Being here representing Brazil, I'm very happy. It's what I always dreamed about and today I'm entering into the history of the Paralympic Games.'
The 200m was just one of the highlights of an amazing night of track and field action.
Great Britain's David Weir provided the home fans with a glorious end to the evening as he was roared to gold in the 5000m - T54 and Terezinha Guilhermina retained her 200m - T11 title in a Paralympic record of 24.82.
Her fellow Brazilian Yohansson Nascimento quickly added to that tally taking 200m - T46 gold in a world record 22.05.
American wheelchair athlete Raymond Martin won the 100m - T52 title.
China's Gao Mingjie won gold in the Javelin - F44, with compatriot Li Huzhao winning gold in the 400m - T53.
Alexey Labzin clocked a Paralympic record 48.59 to win the 400m - T13 and fellow Russian Nikol Rodomakina took the Long Jump - F46 title.
It proved a good night for Russia as Evgenii Shvetcov took the 100m - T36 title, while China's Zhou Guohua grabbed the glory in the 100m - T12.
France's Mandy Francois-Elie claimed 100m - T37 victory and compatriot Marie-Amelie le Fur the women's 100m - T44 crown, while Finland's Leo Pekka Tahti was crowned the champion over 100m in the T54 class.
Spain's David Casino won the Discus - F11 title, with China's Huang Lisha taking the 100m - T53 crown.
Other gold medallists included Switzerland's Edith Wolf in the 5000m - T54, Serbia's Tanja Dragic in the Javelin - F12/13 and Great Britain's Aled Davies in the Discus - F42.