Wagner was born into a family with a strong history in Australian rules football in Queensland, with his father, Scott Wagner, a 200-gamer for the Sandgate Football Club and he was the inaugural captain of the development side, and his grandfathers, Gary Wagner and Col "Skinny" Robinson, played in premiership sides for Sandgate, along with Gary being a member of AFL Queensland's Hall of Fame. Josh played soccer and rugby union at a young age and he was introduced to Australian rules football by one of his friends and he played under nines with Sandgate before moving to the Aspley Football Club, playing the remainder of his junior career there; he debuted in the senior team in 2011 at 16 years of age. Despite playing for Queensland in the 2012 AFL Under 18 Championships, groin issues along with a lack of discipline off-field meant Wagner was not drafted in 2012 as he "wasn't ready for AFL football yet". He spent the next three years playing in Aspley's senior side in the NEAFL and he played in the three consecutive grand finals from 2013–2015, including the winning grand final in 2014 against the Sydney Swans reserves, where he was named the second best player for Aspley. His 2015 season was rewarded with selection in the NEAFL representative match against the Tasmanian State League and he was named as the half-back flank in the NEAFL team of the year. The Melbourne Football Club's list manager, Jason Taylor, praised him by noting "his last couple of years have been pretty solid...he's a left-footer and a rebounding defender, who can play on the wing and spend a bit of time in the midfield. We think he’s got the right attitude."
AFL career
Wagner was drafted by the Melbourne Football Club with their first selection and sixth overall in the 2016 rookie draft. He made his debut in the five-point loss to in round 3, 2016 at Blundstone Arena, where he recorded eight-disposals. After a relatively quiet debut, he recorded twenty-four disposals, six marks, five tackles and two contested marks, at seventy-one percent disposal efficiency in his second match; he polled in the Channel 7 and The Ageplayer of the year votes, and he was named as one of Melbourne's best players by AFL Media and The Age. He played a consecutive eleven matches before succumbing to a knee injury and he missed the round 15 and 16 matches against at the Melbourne Cricket Ground and at TIO Stadium respectively. He was recalled to the senior side for the round 17 match against at Etihad Stadium. He played the next two games before being rested for the round 20 match against at the Melbourne Cricket Ground. He played the remainder of the season in the Victorian Football League for Melbourne's affiliate team, the Casey Scorpions, finishing with fourteen AFL matches for the season and a fourteenth place finish in Melbourne's best and fairest count. After spending the season on the rookie list, he was promoted to the senior list in October along with a two-year contract.