This happened when the Pandavas were married to Draupadi and they were ruling over Indraprastha.
On the advice of Shri Krishna, Yudhishthira decided to perform the Rajosuya yagya.
Shri Krishna said to Yudhishthira, "Jarasandha, the King of Magadha, will not accept your supremacy. Hence, it is advisable to slay Jarasandha before performing the Rajasuya yagya."
Yudhishthira said to Shri Krishna,
"I wish to rule in peace. I do not desire to become the 'Emperor'. When you yourself are afraid of Jarasandha, what can we hope to do?"