The news was revealed on 92Live, with Tomlinson due to remain with the band while playing for the club on an occasional basis.
Tomlinson played in a charity match at the Keepmoat Stadium last season and will now feature for the Championship club in between band commitments.
He has been given the number 28 shirt previously used by chairman John Ryan when he briefly appeared for Rovers in a Conference game in 2003.
Tomlinson is a lifelong Rovers fan who regularly attended their fixtures before finding fame, and even he seemed shocked at being signed up by his hometown club.
"It's unbelievable really. I have been a massive football fan for a long time and growing up in Doncaster, I've been to plenty of games at the Keepmoat," Tomlinson told 92Live on Sky Sports News.
"To be part of the club is incredible."
Reserve game plan
Tomlinson is currently on tour in the USA with One Direction and admitted he may not get the chance to appear for the club until later in the year.
"Realistically, September/October time, we might be doing a reserve game," he added.
Rovers manager Paul Dickov joked that Tomlinson needed to get back to the UK to be ready for the new season but is confident his signing will be good for the club.
"He's missed pre-season trainng and he's having a holiday in America, so we'd better get him over here pretty soon," he said.
"It's great with Louis being a Doncaster supporter, it raises the profile of the club. There was a charity game here last year that attracted nearly 9,000 fans.
"We hope to get him here in September to do a little bit of training and will look to get him involved in a reserve-team game, with all the proceeds going to his charity (local children's hospice Bluebell Wood)."