Taban Amin, a grandson of former President Idi Amin, has become a member of parliament for Kibanda North constituency.
Mr Amin was unopposed after his main challenger, Sam Amooti Otada, lost a court petition and withdrew from a by-election race.
The parliamentary seat fell vacant in July after the Court of Appeal nullified the earlier election of Mr Amin on grounds that he had not fully complied with the electoral laws.
Mr Amin now becomes an MP for the ruling NRM headed by President Yoweri Museveni.
Mr Museveni was part of a group of Ugandan exile forces, backed by Tanzanian troops, who toppled Idi Amin in 1979.