Tanzania-based Okwi had been a constant menace down the right wing before scoring the only goal on a hot afternoon in the 45,000-seat Mandela National Stadium.
A cross slid off the head of Ugandan Murushid Juuko and dropped at the feet of Okwi just inside the Egyptian box.
He cut inside an Egyptian, took the ball across another, then unleashed a low shot that flew past 44-year-old goalkeeper Essam El Hadary into the far corner of the net.
Uganda World Cup hopes boosted
Victory lifted Uganda, who have never qualified for a World Cup, to seven points in Group E. Egypt have six, Ghana one and Congo Brazzaville none.
Ghana host Congo this Friday in Kumasi and maximum points for the "Black Stars" will bring them back into contention for a fourth consecutive World Cup appearance.
Only the five Africa zone group winners qualify for the 2018 tournament in Russia.
Bangoura secures Guinea win
In Conakry, Alkhaly Bangoura scored in stoppage time to give Guinea a dramatic 3-2 victory over fellow strugglers Libya in a must-win Group A match for both teams.
Leading by two goals from midway through the first half, the Guineans were rocked when Libya netted twice within a minute in the closing stages to equalise.
The first Guinean goal was scored by Naby Keita, who agreed this week to join Liverpool from RB Leipzig for the 2018-2019 season.
Tunisia and the Democratic Republic of Congo, who meet Friday in Rades, share the lead with six points, Guinea have three and Libya none.
There are five qualifiers scheduled for Friday, including Nigeria hosting Africa Cup of Nations title-holders Cameroon in a top-of-the-table Group B clash.