After the sudden death of the then-incumbent chief minister of Andhra Pradesh, Y. S. Rajasekhara Reddy (YSR) in a helicopter crash in September 2009, his son Y. S. Jagan Mohan Reddy, the incumbent MP from Kadapa, started an Odarpu Yatra (condolence tour) across Andhra Pradesh, to console the families of those who had committed suicide or died of shock after the death of his father. This tour was not supported by the Congress leadership. Defying the Congress Working Committee's order to call off the tour, Jagan went ahead with the first leg of the "Odarpu Yatra" in the West Godavari and Khammam districts in April 2010.
After accusing the Congress of ill-treating him and creating rift in his family by luring his uncle Y. S. Vivekananda Reddy (younger brother of YSR) with a state ministerial berth in the aftermath of the death of his father, Jagan and his mother Y. S. Vijayamma resigned from the Kadapa Lok Sabha and Pulivendula Assembly constituencies respectively and also as members of the Congress in November 2010. Many Congress leaders loyal to Jagan also quit the Congress and joined the YSR Congress. This resulted in the weakening of the Congress's strength in both the assembly and the Lok Sabha, necessitating by-elections.
In 2012 by-polls where held for 18 assembly constituencies where: Parkal, Narsannapeta, Payakaraopet, Ramachandrapuram, Narasapuram, Polavaram (ST), Prathipadu (SC), Macherla, Ongole, Udayagiri, Rajampet, Kodur (SC), Rayachoti, Allagadda, Yemmiganur, Rayadurg, Anantapur Urban and Tirupati.
In the ensuing by-elections, after the formation of the party, it won most of the vacated seats with many of the Indian National Congress (governing party) and the Telugu Desam Party (the main opposition) candidates losing their deposits. In March 2012, YSR Congress won the Kovur assembly seat in Nellore district in a by-election.
On 15 June 2012, YSR Congress won the Nellore Lok Sabha seat and 15 of 18 assembly seats in Andhra Pradesh. YSRCP leaders P. Subhash Chandra Bose from Ramachandrapuram constituency of East Godavari district and Konda Surekha from Parkal constituency of Warangal district, both ministers in the YSR cabinet, had switched to YSR Congress party but lost their races.
It went for 2019 general elections by appointing Prashant Kishor, a renowned political strategist in Indian elections and emerged as the 5th largest political party in India. It did not contest in 2018 Telangana Legislative Assembly election.
The party won the 2019 Andhra Pradesh Legislative Assembly election in a landslide, winning 151 of the 175 seats, including a clean sweep of the Kadapa, Kurnool and Nellore districts. It has been in government since 30 May 2019 and currently the party has a strength of 151 members in the 175 member state assembly and 22 members in the Lok Sabha (out of 25 in AP) as the election results declared on 23 May 2019.
In 2022, the Election Commission of India (ECI) sought clarification from the YSR Congress Party regarding the reports announcing Y. S. Jagan Mohan Reddy as the permanent president of the party. The ECI expressed its displeasure and concern over this potential adoption by the party, citing it as an anti-democratic move.