The Supreme Court overturned the National Lottery Act 2005, which the National Assembly passed.
The decision followed a suit launched in 2008 by Lagos and several other states.
The Apex Court ruled on Friday in a unanimous decision of seven justices that the National Assembly lacked the authority to act on lottery and game of chance matters.
Justice Mohammed Idris delivered the lead judgment.
The court decided that such authority rests only with the state Houses of Assembly, which have exclusive jurisdiction over lotteries and games of chance.
The court also ruled that the National Lottery Act of 2005 should no longer be applied in all states except the Federal Capital Territory (FCT).