Trump said Comey, who the president fired in 2017, was Mueller's "best friend," and appeared to complain that Comey should have been fired before Trump took office.
"Unfortunately, you put the wrong people in a couple of positions and they leave people for a long time that shouldn't be there and all of a sudden they are trying to take you out with bu****it, okay?" Trump said.
"Now Robert Mueller never received a vote and neither did the person who appointed him," he added.
Deputy attorney general Rod Rosenstein appointed Mueller in May 2017 to take over the Russia investigation after Trump fired Comey, whose agency had led the probe initially. Rosenstein is expected to step down by mid-March.
Trump mocked the Southern accent of Sessions and criticised him for recusing himself from the Russia probe. In November, Trump fired Sessions, a former US senator from Alabama who was among the first Republican lawmakers to back Trump's presidential bid.
Trump also said he would soon sign an executive order requiring American universities and colleges to maintain "free speech" on campuses and threatened that schools not complying could lose federal research funds.
Trump made his remarks at the annual Conservative Political Action Conference after bringing to the stage Hayden Williams, a conservative activist who was punched at the University of California, Berkeley, last month while recruiting students for a conservative group.
"Today, I am proud to announce that I will be very soon signing an executive order requiring colleges and universities to support free speech if they want federal research funds," Trump said.
'We're waiting for a report by people who weren't elected,' Trump said of the Mueller report, which is said to be days away from being handed over to Attorney General William Barr.