Haryanto began his car racing career competing in three Asian-based series during 2008: the Asian Formula Renault Challenge, Formula Asia 2.0, and Formula BMW Pacific. He was most competitive in the FAsia 2.0 series, winning two races to finish third overall in the championship behind expatriate European drivers Felix Rosenqvist and Matthias Beche.
In 2009 he again competed in a variety of series, including the Australian Drivers' Championship and the Asian Formula Renault Challenge once more. His main focus this year, however, was the Formula BMW Pacific championship, which he dominated with 11 victories from the 15 races (although five of these races were won outright by invitational drivers who were not entered in the championship), driving for the Malaysian Meritus team. This included a perfect run of four outright victories, pole positions and fastest laps in the four consecutive races held at his home circuit of Sentul. He also competed in a round of the equivalent European FBMW series, himself a guest driver on this occasion.
Haryanto stepped up to the more competitive European racing scene full-time for 2010 by joining the Manor Racing team for the Formula One-supporting GP3 Series. His three teammates during the season were James Jakes, Adrien Tambay and Adrian Quaife-Hobbs. In an impressive first season at this level, he won a race at Istanbul Park and took two further podium placings to finish fifth place in the drivers' championship, the leading Manor driver. His form was "one of the surprises of the season", according to the Autosport magazine. He remained with the team for 2011, now badged as Marussia Manor Racing, alongside Quaife-Hobbs and Matias Laine. Despite increasing his victory count to two, with wins at the Nürburgring and the Hungaroring, his inconsistency—including a run of seven races without scoring points at the start of the year—saw him slip to seventh place in the championship, behind Quaife-Hobbs. Both of his victories were in rainy conditions, giving him something of a reputation as a wet-weather specialist.
In addition to his GP3 duties, Haryanto also drove for the DAMS team in the Auto GP series, competing in all but one round of the championship as it clashed with the GP3 schedule. Driving alongside Sergey Afanasyev and part-timer Tambay, he took a win at the Circuit Ricardo Tormo in Valencia and finished seventh in the drivers' standings. The efforts of Haryanto, Afanasyev, Tambay, and Haryanto's substitute, Kevin Korjus, were enough for DAMS to win the teams' championship.
Haryanto made his GP2 Series début with DAMS at the non-championship season finale at Yas Marina in 2011. He was in the series full-time for 2012 with the Marussia-backed Carlin team, where he partnered Max Chilton. He was the first Indonesian to compete at this level of motorsport since Ananda Mikola competed in International Formula 3000 during 2000 and 2001. In his first season of GP2, Haryanto secured a single fastest lap, a single pole position—in wet conditions at Spa, confirming his reputation as a wet-weather specialist—and a best race finish of fifth in the feature race at Valencia, securing 14th place in the championship at season's end.
He raced in the 2013 GP2 Series for the Barwa Addax Team alongside teammate Jake Rosenzweig. On 30 June 2013, he gained his first podium in the GP2 Series at Silverstone and the same time, first podium for the Barwa Addax Team in the 2013 GP2 season.
For the 2014 GP2 Series he moved to EQ8 Caterham Racing, partnering with Alexander Rossi. On 24 May 2014, he gained his second podium in the GP2 Series at Monaco and, at the same time, first podium in the 2014 GP2 season.
Haryanto switched to Campos for the 2015 GP2 Series season. After taking second place at the feature race in Bahrain, Haryanto took his first win in GP2 in the following day's sprint race. He achieved his second victory in the sprint race at the Red Bull Ring despite a damaged front wing. Haryanto finished the 2015 GP2 Series season in fourth place with 138 points.
Haryanto has been linked to the Virgin Racing/Marussia F1/Manor Racing team since his first GP3 season with Manor in 2010, as he has driven for junior teams with its backing since then. In the autumn of that year, he won the right to test with Virgin at the end of the 2010 season due to his finishing position as the highest ranked Manor driver in the GP3 final standings. He tested for Virgin in Abu Dhabi on 16 November. Suffering gearbox problems, he posted the slowest time of the thirteen runners in the morning session. He did not receive the prize test in 2011 because teammate Adrian Quaife-Hobbs beat him in the standings on this occasion.
Haryanto and 2012 GP2 Series teammate Max Chilton drove for Marussia in the first young driver tests of 2012, held in-season at Silverstone. Running over the course of two days, Haryanto completed three hundred kilometres of testing, satisfying one of the conditions to be eligible for a superlicence and becoming the first Indonesian driver to qualify for one.
On 18 February 2016 Haryanto was confirmed as a driver of Manor Racing for the 2016 Formula One season alongside 2015 DTM Champion Pascal Wehrlein. He made his debut at the 2016 Australian Grand Prix, however got off to a rocky start with an incident involving Romain Grosjean when they collided in the pit lane during practice. Haryanto was later issued a three-place grid penalty for the incident, as well as two penalty points added to his licence. Haryanto retired from his debut race due to a drive link problem on the 18th lap.
Haryanto was the second driver to be eliminated from qualifying for the 2016 Bahrain Grand Prix, ahead of Felipe Nasr. However, this meant a grid place of 20th due to Renault's Kevin Magnussen having to start from the pitlane after failing to stop for weighing during practice. He was the last car to finish the race, in 17th place and one lap down. He managed to beat the other Renault driver Jolyon Palmer to 21st in China, before he became tangled up in a first-lap crash in Russia that involved Nico Hülkenberg and Esteban Gutiérrez. Haryanto repeated his Bahrain performance in Spain, with his next race in Monaco bringing him a career-best 15th, albeit 4 laps down and once again the last classified finisher. He remained the last classified car in the next two races, with 19th and 18th places, before a 16th-place finish in Austria brought attention to the rift in talent between himself and teammate Wehrlein, who scored Manor's only point of the season in the same race. He spun off in the wet in Britain, whilst what would turn out to be his final two races again saw him the last classified finisher as his future became unclear due to a lack of sponsorship.
On 10 August 2016, Manor confirmed that they were demoting Haryanto to reserve driver due to the lack of sponsorship, with Esteban Ocon announced as his replacement. When the parent company of the team collapsed at the end of the season, Haryanto was the only driver of the team not to make the 2017 grid, with Ocon and Wehrlein moving to Force India and Sauber respectively.