Based on the the best-selling novel by Ernest Cline, the project will start filming in June, said The Hollywood Reporter.
The movie also stars Tye Sheridan, Olivia Cooke and Ben Mendelsohn.
Set in a virtual world called Oasis, the story revolves around a teenager (Sheridan), who finds himself competing in a treasure hunt against ruthless foes after the game's founder dies and offers his fortune as the grand prize.
If things workout Pegg will play Orgen Morrow, the co-creator of Oasis.
The project is being produced by Spielberg through his Amblin Partners banner, along with Donald De Line, Kristie Macosko Krieger and Dan Farah.