Montoya began karting at age five, trained by his father, and progressed through Colombian racing before moving to Europe. He won seven races in Formula 3000 across 1997 and 1998, winning the 1998 championship with Super Nova Racing. He debuted in CART with Chip Ganassi Racing in 1999, winning the championship as a rookie with seven victories — the youngest CART champion at the time and only the second rookie champion after Nigel Mansell. In May 2000, Montoya won the Indianapolis 500 on his first attempt in the rival Indy Racing League, leading 167 of 200 laps.
Montoya joined Williams for the 2001 Formula One season, winning his maiden race at the Italian Grand Prix after starting from pole. He finished third in the World Drivers' Championship in both 2002 and 2003 — narrowly missing the 2003 title — and fourth in 2004 and 2005. He moved to McLaren for 2005, winning in Britain, Italy, and Brazil. Montoya left Formula One mid-season in 2006 after the United States Grand Prix and transitioned to NASCAR.
Driving for Earnhardt Ganassi Racing, Montoya won the Toyota/Save Mart 350 at Infineon Raceway in 2007, his first NASCAR Cup Series victory. He added the Heluva Good Sour Cream Dips at the Glen at Watkins Glen in 2010 and qualified for the Chase for the Sprint Cup in 2009, finishing eighth in the championship standings that year. He contested seven full NASCAR seasons before departing at the end of 2013.
Montoya returned to IndyCar with Team Penske in 2014, winning at Pocono in the fastest 500-mile race in series history at the time. In 2015 he won the season opener at St. Petersburg and the Indianapolis 500 for the second time, eventually losing the championship on a tiebreak to Scott Dixon despite finishing level on points. He won the 2016 season opener at St. Petersburg. After appearing at the Indianapolis 500 with Penske in 2017 and with Arrow McLaren SP in 2021 and 2022, he made a final one-off NASCAR appearance in 2024.
Montoya made his endurance racing debut at the 2007 24 Hours of Daytona, winning with Chip Ganassi Racing alongside Salvador Duran and Scott Pruett. He won again in 2008 with Franchitti, Pruett, and Rojas, and was second in 2009 by just 0.167 seconds. He won a third Daytona in 2013 with CGR.
He joined Team Penske's full-time IMSA programme ahead of the 2018 season, preparing by contesting the 2017 Petit Le Mans with Castroneves and Pagenaud. Partnered with Dane Cameron in the number 6 Acura ARX-05 from 2018 to 2020, with Simon Pagenaud for three endurance events each season, Montoya's results improved significantly in 2019. He and Cameron won consecutive races at Mid-Ohio, Detroit, and Laguna Seca, and earned the DPi Drivers' Championship with 302 points by finishing fourth at the season-ending Petit Le Mans. He also made his 24 Hours of Le Mans debut in 2017 with United Autosports, finishing third in LMP2.
In 2021 Montoya won his class in the 24 Hours of Le Mans driving for DragonSpeed in the LMP2 category. He competed in LMP2 with DragonSpeed USA in 2022 IMSA events, winning his category at the Lexus Grand Prix at Mid-Ohio.
Montoya received the Order of Boyacá and the Order of José Acevedo y Gómez in 1999, the Laureus World Sports Award for Breakthrough of the Year in 2002, and was inducted into the Long Beach Motorsports Walk of Fame in 2018. He married law graduate Connie Freydell in 2002; their son Sebastián is also a racing driver. The Kartódromo Juan Pablo Montoya in Tocancipá, Colombia is named after him.