What is Allegiance?

Legal Definition
An allegiance is a duty of fidelity said to be owed, or freely committed, by the people, subjects or citizens to their state or sovereign.
-- Wikipedia
Legal Definition
The tie which binds the citizen to the government, in return for the protection which the government affords him.

2. It is natural, acquired, or local. Natural allegiance is such as is due from all men born within the United States; acquired allegiance is that which is due by a naturalized citizen. It has never been decided whether a citizen can, by expatriation, divest himself absolutely of that character. 2 Cranch, 64; 1 Peters' C. C. Rep. 159; 7 Wheat. R. 283; 9 Mass. R. 461. Infants cannot assume allegiance, (4 Bin. 49) although they enlist in the army of the United States. 5 Bin. 429.

3. It seems, however, that he cannot renounce his allegiance to the United States without the permission of the government, to be declared by law. But for commercial purposes he may acquire the rights of a citizen of another country, and the place of his domicil determines the character of a party as to trade. 1 Kent, Com. 71; Com. Rep. 677; 2 Kent, Com. 42.

4. Local allegiance is that which is due from an alien, while resident in the United States, for the protection which the government affords him. 1 Bl. Com. 366, 372; Com. Dig. h.t; Dane's Ab. Index, h. t.; 1 East, P.C. 49 to 57.
-- Bouviers Law Dictionary
Legal Definition
By allegiance ls meant the obligation of fidelity and obedience which the individual owes to the government under which he lives or to his sovereign in return for the protection he receives. It may be an absolute and permanent obligation or it may be a qualified and temporary one. The citizen or subject owes an absolute and permanent allegiance to his government or sovereign or at least until, by some open and distinct act, he renounces it and becomes a citizen or subject of another government or another sovereign. The alien, while domiciled in the country, owes a local and temporary allegiance, which continues during the period of his residence. Carlisle v. U. S., 16 Wall. 154, 21 In Ed. 426; Jackson v. Goodell, 20 Johns. (N. Y.) 191; U. S. v. Wong Kim Ark, 169 U. S. 649, 18 Sup. Ct. 456, 42 In Ed. 890; Wallace v. Harmstad, 44 Pa. 501. "The tie or ligamen which binds the subject [or citizen] to the king [or government] in return for that protection which the king [or government] affords the subject, [or citizen."] 1 Bl. Comm. 366. It consists in "a true and faithful obedience of the subject due to his sovereign." 7 Coke, 4b. Allegiance is the obligation of fidelity and obedience which every citizen owes to the state. Pol. Code Cal. ยง 55. In Norman French. Alleviation; relief; redress. Kelhain.
See also
-- Black's Law Dictionary