Ugandan nationality law is regulated by the Constitution of Uganda, as amended; the Uganda Citizenship and Immigration Control Act; and various international agreements to which the country is a signatory. These laws determine who is, or is eligible to be, a national of Uganda. The legal means to acquire nationality, formal legal membership in a nation, differ from the domestic relationship of rights and obligations between a national and the nation, known as citizenship. Nationality describes the relationship of an individual to the state under international law, whereas citizenship is the domestic relationship of an individual within the nation. Commonwealth countries often use the terms nationality and citizenship as synonyms, despite their legal distinction and the fact that they are regulated by different governmental administrative bodies. Ugandan nationality is typically obtained under the principal of jus sanguinis, i.e. by birth to parents with Ugandan nationality. It can be granted to persons with an affiliation to the country, or to a permanent resident who has lived in the country for a given period of time through naturalisation or registration.

Acquiring Ugandan nationality Nationality can be obtained in Uganda at birth or later in life through naturalisation or registration.

By birth Typically, in Uganda, provisions to acquire nationality through jus soli, i.e. by birth in the territory, require that a person have ancestry with a particular racial or ethnic background. Those who are eligible for nationality by birth include:

Persons born anywhere who have at least one parent or grandparent who was a national of Uganda by birth; Persons born in Uganda who belong to one of the sixty-five indigenous communities defined in the constitution of Uganda by virtue of having a parent or grandparent who lived in the territory on 1 February 1926; or Foundlings or orphans under the age of five whose parents are unknown.

By naturalisation or registration Naturalisation can be granted to persons who have resided in Uganda for a sufficient period of time to confirm they understand the English or another language of Uganda, the customs and traditions of the country and the responsibilities of citizenship. General qualifications are that applicants have good character and can verify legal residency of a minimum of ten years. Persons whose parents or grandparents had diplomatic immunity, were refugees, or who have not continuously resided in Uganda since 9 October 1962, are ineligible to acquire Ugandan nationality by registration. Minor children may not be included in a naturalisation petition of their parent. Besides foreigners meeting the criteria, those who can naturalise or register include:

Adoptees under the age of eighteen may acquire Ugandan nationality by registration, upon completion of the legal adoption process; The spouse of a Ugandan national may register as Ugandan after the marriage has endured for at least five years; or Persons who have voluntarily migrated and resided in the country for twenty years may register as nationals.

Loss of nationality Ugandans are allowed to renounce their nationality, provided that they comply with registration processes and prove that they have obtained other nationality. Furthermore, Ugandan citizenship is lost if another citizenship is obtained, without having applied for dual citizenship. Before 2005, it was generally lost upon obtaining another citizenship. The government may oppose during times of war or if there is a conflict with public policy. Nationals of origin cannot be deprived of their nationality. Naturalised or registered persons can be denaturalised for working for another nation or military without governmental consent; for committing serious crimes, disloyal acts, or crimes against the state or state security; or for committing fraud, misrepresentation, or concealment in a naturalisation or registration application. Persons who were Ugandan by birth have previously lost their nationality may apply for repatriation, if restoring their nationality would not be contrary to public order and security. According to the Ugandan embassy in Berlin, children born to Ugandan parents abroad are not entitled to Ugandan citizenship if they are also citizens of their country of residence.

Dual nationality Since 2005, Uganda has allowed dual nationality for most persons, though persons wishing to naturalize must comply with a complex series of conditions. Holding more than two nationalities is not permitted and persons must prove that their other nationality does not restrict dual nationality. Members of the government — such as the president or vice president, prime minister or cabinet ministers, or heads of security services — may not have dual nationality.

Commonwealth citizenship Uganda joined the Commonwealth of Nations on 9 October 1962 and at that time, Ugandans gained the status of Commonwealth citizens.

History African people and European contact (1200–1894) Archaeological evidence shows that pastoralist Nilo-Saharan speakers dominated the dry northern regions of the territory. From the first millennium BC, Bantu-speaking immigrants began to arrive from the east settling in the southern savanna of the Great Lakes region. By the second century, kingdoms emerged in the region which were organized under a system of patronage, wherein protection was offered in exchange for services. People who inhabited the northern region, like the Acholi, developed kinship and clan chiefdoms, but did not typically centralise their governance into large political kingdoms. Around 1200, the Empire of Kitara came to dominate the Great Lakes region and was succeeded by the Bunyoro Kingdom (also known as the Bunyoro-Kitara Kingdom) in the fourteenth century. As Bunyoro reached its peak and began its long decline in the sixteenth century, the Kingdom of Buganda was established. Bunyaro stretched across the south and southwest of the territory that is now Uganda and required tributes from smaller kingdoms like Ankole and Tooro. Buganda was centered at the northwest corner of Lake Victoria. These two kingdoms were the most powerful Bantu Kingdoms when Europeans arrived in the mid-nineteenth century.

Little contact with outsiders occurred before the nineteenth century, though trade emerged with Egypt, Sudan, and Zanzibar between 1823 and 1850. British explorer John Hanning Speke visited the area in 1862, followed by Samuel Baker who reached Lake Albert in 1864 and Henry Morton Stanley, who came in contact with the Buganda Kingdom in 1875. Soon after Stanley's visit, missionaries began to arrive in the territory, followed by European traders. By 1882, Britain and Germany had competing claims in the region. Britain, became increasingly protective of the area in large measure because of Egyptian interest after it had occupied Egypt under the guise of protecting the Suez Canal. Germany, was attempting to consolidate its rule over the territory between Lake Victoria, and Lake Malawi and west toward Lake Tanganyika. In 1890, under the terms of the Heligoland–Zanzibar Treaty, Britain acquired control of Uganda in exchange for German control of territories in present-day Burundi, Rwanda, and Tanzania.

British protectorate (1894–1962) At the end of 1890, the British East Africa Company signed a protection agreement with Buganda for their help in a dispute with Bunyoro. In exchange for protection, Buganda agreed not to make trade agreements with other countries. Using Buganda as the center of their operations, Britain began to expand to other kingdoms, extending their rule to Ankole, Busoga, Kigezi, Kisoro and other kingdoms and chiefdoms. In 1893, the crown took over the territories from the East Africa Company and the following year formally declared its authority over the protectorates. In 1902, the territories were combined into the single Uganda Protectorate and from 1914 the modern boundaries of Uganda were settled except for the transfer of Rudolph Province to the jurisdiction of Kenya in 1926. Armed force was used between 1897 and 1933 against Bunyoro, when it was finally subdued and incorporated into the protectorate. During the period of colonial rule, large numbers of Asian indentured workers were brought from India and Pakistan to work in agriculture, as were Banyarwanda people from Ruanda-Urundi. Other Asians who lived in the British Empire migrated voluntarily to participate in economic activities.

In Britain, allegiance, in which subjects pledged to support a monarch, was the precursor to the modern concept of nationality. The crown recognized from 1350 that all persons born within the territories of the British Empire were subjects. Those born outside the realm — except children of those serving in an official post abroad, children of the monarch, and children born on a British ship — were considered by common law to be foreigners. Marriage did not affect the status of a subject of the realm, but under common law, single women, including divorcées, were not allowed to be parents thus their children could not derive nationality maternally and were stateless unless legitimated by their father. British Nationality Acts did not extend beyond the bounds of the United Kingdom of Great Britain and Ireland, meaning that under Britain's rules of conquest, laws in place at the time of acquisition remained in place until changed. Other than common law, there was no standard statutory law which applied for subjects throughout the realm, meaning different jurisdictions created their own legislation for local conditions, which often conflicted with the laws in other jurisdictions in the empire. Thus, a person who was naturalised in Canada, for example, would be considered a foreigner, rather than a British national, in Australia or South Africa. When British protectorates were established in 1815, there was little difference between the rights of British subjects and protected persons.

British subjects living in the Uganda Protectorate (1914–1960) In 1911, at the Imperial Conference a decision was made to draft a common nationality code for use across the empire. The British Nationality and Status of Aliens Act 1914 allowed local jurisdictions in the British self-governing territories to continue regulating nationality in their jurisdictions, but also established an imperial nationality scheme for use throughout the realm. Under its terms, common law provisions were reiterated for natural-born persons born within the realm on or after the effective date. By using the word person, the statute nullified legitimacy requirements for jus soli nationals, meaning an illegitimate child could derive nationality from its mother. For those born abroad on or after the effective date, legitimacy was still required, and nationality could only be derived by a child from a British father (one generation), who was natural-born or naturalised. It also provided that a married woman derived her nationality from her spouse, meaning if he was British, she was also, and if he was foreign, so was she. It stipulated that upon loss of nationality of a husband, a wife could declare that she wished to remain British. It allowed that if a marriage had terminated, through death or divorce, a British-born national who had lost her status through marriage could reacquire British nationality through naturalisation without meeting a residency requirement. The statute specified that a five-year residency or service to the crown was required for naturalisation.