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
All passengers were evacuated from a London Midland train this morning after wheels of a train caught fire at the Lapworth Railway Station.
Aston Villa boss says midfielder Jack Grealish's recent behaviour breached "club discipline" after dropping him from the first team.
Birmingham boxer Frankie Gavin threw broken bottles at a man, smashed a bar stool over another man’s head, a court heard.