Mostert attended New Smyrna Beach High School in New Smyrna Beach, Florida, where he played football and competed in track and field. Mostert led New Smyrna Beach to two playoff berths. After his senior season, he moved on to Purdue University.
In his first collegiate season, he set a school record as he averaged 33.5 yards a return, capped off with a 99-yard touchdown return in the bowl game. He finished the season with seven returns of 39 or more yards, including an 81-yarder at Indiana and a 74-yarder at Wisconsin. Against the Badgers, he racked up 206 yards on five kickoff returns to break 42-year-old school records for total yardage and average yards per return.
Mostert attended and played college football at Purdue from 2011–2014. In his first collegiate season in 2011, he set a school record as he averaged 33.5 yards a return, capped off with a 99-yard touchdown return in the 2011 Little Caesars Pizza Bowl against Western Michigan. He finished the season with seven returns of 39 or more yards, including an 81-yarder at Indiana and a 74-yarder at Wisconsin. Against the Badgers, he racked up 206 yards on five kickoff returns to break 42-year-old school records for total yardage and average yards per return in a single game. (41.2) For his efforts against Wisconsin, he was named the Big Ten Freshman of the Week, becoming the first Purdue freshman to do it since Rob Henry in October 2010. His 837 kickoff return yards are the second best in school history for a single season. He is now ranked 13th on Purdue’s career kickoff return yards.
In May 2012, Mostert was named to the preseason Jet Award watch list, an award given to the top return specialist in the NCAA. During spring practice, Mostert was named a captain for the 2012 season. In the 2012 season, he finished with 16 carries for 85 rushing yards and a rushing touchdown to go along with 18 kick returns for 463 net yards. In the 2013 season, he finished with 11 carries for 37 rushing yards to go along with 11 kick returns for 258 net yards and a return touchdown, which was a 100-yarder against Penn State. His role expanded in the 2014 season. He finished with 93 carries for 529 rushing yards and three rushing touchdowns to go along with 34 kick returns for 731 net return yards.
On November 28, 2016, Mostert was signed to the 49ers’ practice squad. He was promoted to the active roster on December 31, 2016. He played in the Week 17 regular season finale against the Seattle Seahawks. He finished the 2016 season with 68 return yards and six rushing yards on one carry.
Mostert played very sparingly in the first five games of the 2018 season. However, his role increased starting in Week 6. Against the Green Bay Packers on Monday Night Football, he had 12 carries for 87 yards in the 33–30 loss. He added 59 rushing yards in the following game against the Los Angeles Rams. During Week 9 of the regular season against the Oakland Raiders on Thursday Night Football, Mostert scored his first NFL touchdown on a 52-yard rush in the third quarter. However, he fractured his forearm during the game. He was placed on injured reserve on November 2, 2018. Overall, Mostert finished the 2018 season with 34 carries for 261 rushing yards and a rushing touchdown.
Mostert scored his first touchdown of the season on a 39-yard reception from Jimmy Garoppolo during a Week 2 41–17 road victory over the Cincinnati Bengals. During Week 8, he scored his first rushing touchdown on a 41-yard rush during the fourth quarter against the Carolina Panthers as the 49ers won by a score of 51–13. During Week 13 against the Baltimore Ravens, Mostert finished with 146 rushing yards, including a 40-yard touchdown as the 49ers lost 17–20. During a narrow Week 14 48-46 road victory over the New Orleans Saints, he rushed 10 times for 69 yards and a touchdown and caught two passes for 40 yards, including a 35-yard touchdown pass thrown by wide receiver Emmanuel Sanders.
Mostert finished the 2019 season with 772 rushing yards and eight touchdowns along with 14 receptions for 180 yards and two touchdowns.
The 49ers began the postseason with a 27-10 victory over the Minnesota Vikings in the Divisional Round, where Mostert rushed 12 times for 58 yards and recovered a fumble lost by punt returner Marcus Sherels before leaving the game due to a calf injury. Mostert returned from the injury in the 37–20 NFC Championship Game victory over the Green Bay Packers with 29 carries for a franchise postseason record of 220 yards and four rushing touchdowns (second in franchise history only to NFL record-holder Ricky Watters, and tied with LeGarrette Blount for second-most in NFL history). It was the second-most rushing yards in NFL postseason history to Eric Dickerson‘s 248 in 1986. In Super Bowl LIV against the Kansas City Chiefs, he rushed 12 times for 58 yards and a touchdown during the 31–20 loss.
In Week 1, Mostert rushed for 56 yards and caught four passes for 95 yards, including a 76-yard receiving touchdown, during the 24–20 loss to the Arizona Cardinals. During Week 2 against the New York Jets, Mostert led the game off with an 80-yard rushing touchdown. He finished with 92 rushing yards overall until leaving the game with an apparent injury after the first two quarters. The 49ers won the game without Mostert by a score of 31–13. He was placed on injured reserve on October 24, 2020 with a high ankle sprain. He was activated on November 28, 2020. He was placed back on injured reserve on December 25, 2020. He finished the season with 521 rushing yards and two touchdowns through eight games.