The singer, who has supported the Rams since he was four, was being filmed at Pride Park for a new film being made about the boy-band.
The film is being directed by Morgan Spurlock, who is the documentary maker behind Supersize Me, where he ate nothing but fast food for 30 days to see what effect it had on his health.
Niall had a kick-about on the pitch with some of his friends before the game kicked off, but no other members of the group were there.
More top news
Former Crewe Alexandra coach Barry Bennell has plead not guilty to eight child sex offences.
A study found almost half of working dads would like to downshift to a less demanding job to spend more time with their family.
A disabled sports fan from Worcestershire has previously complained about the lack of accessibility at some of our stadiums.