In November 2017, he scored his maiden triple century in first-class cricket, when he made 304 not out batting for Karnataka against Maharashtra in the 2017–18 Ranji Trophy. It was the 50th triple century scored in first-class cricket in India. During the same month, he scored 1,000 runs in first-class cricket. He was the leading run-scorer in the 2017–18 Ranji Trophy, finishing the tournament with 1,160 runs. In January 2018, he was bought by the Kings XI Punjab in the 2018 IPL auction. In February 2018, he was the leading run-scorer in the 2017–18 Vijay Hazare Trophy, with 723 runs in eight matches. He scored 2,141 runs across all formats, the highest total by any batsman in an Indian domestic season. In June 2018, he was awarded with the Madhavrao Scindia Award For The Highest Run-Scorer In Ranji Trophy by the Board of Control for Cricket in India. He was the leading run-scorer for Karnataka in the 2018–19 Vijay Hazare Trophy, with 251 runs in seven matches. In October 2018, he was named in India B's squad for the 2018–19 Deodhar Trophy. The following month, he was named as one of eight players to watch ahead of the 2018–19 Ranji Trophy. In October 2019, he was named in India C's squad for the 2019–20 Deodhar Trophy.
International career
In September 2018, he was named in India's Test squad for their series against the West Indies, but he did not play. In December 2018, he was added to India's Test squad for their series against Australia, after Prithvi Shaw was ruled out of the side due to injury. He made his Test debut against Australia on 26 December 2018, scoring seventy-six runs in his first innings at the Melbourne Cricket Ground. This was the highest score by an Indian cricketer on a Test debut in Australia, going past the previous record of 51 runs set by Dattu Phadkar, at the Sydney Cricket Ground in 1947. He played the 4th test also and finished the series with 195 runs. In July 2019, he was added to India's squad for the 2019 Cricket World Cup, replacing Vijay Shankar, who was ruled out of the rest of the tournament due to injury. In October 2019, in the first Test matchagainst South Africa, Agarwal scored his maiden century in Test cricket. He went on to convert this into his first double hundred in a Test match, before being dismissed for 215 runs of 371 balls with 23 fours and 6 sixes. After hitting his 2nd Test hundred against South Africa, Agarwal became only the 2nd Indian opener after Virender Sehwag to score back to back centuries against South Africa. In November 2019, Mayank Agarwal hit his second double century in only his eighth Test match, at Indore against Bangladesh, recording his current highest score of 243 in 330 deliveries with eight sixes. He broke the record of Donald Bradman to become the second-fastest batsman to score two double hundreds, having achieved this in 12 innings. The following month, he was added to India's One Day International squad for the series against the West Indies, replacing the injured Shikhar Dhawan. He made his ODI debut for India, against New Zealand, on 5 February 2020.
Personal life
Agarwal practices the meditation technique of Vipassanā, being introduced to it by his father Anurag Agarwal. He is also said to have been inspired by the Joseph Murphy book The Power of the Subconscious Mind. In January 2018, Agarwal got engaged to Aashita Sood, daughter of Bangalore Police commissioner Praveen Sood and married her on 6 June 2018.