A statement from the Tanzanian presidency said the two leaders had condemned the move, during a meeting in western Uganda.
"President Magufuli said this decision compromised efforts by the East African Community, which has put in place a committee charged with seeking a resolution to the Burundi conflict, led by President Yoweri Museveni and former Tanzanian president Benjamin Mkapa," said the statement.
Museveni is the current president of the EAC, a regional bloc made up of Tanzania, Uganda, Kenya, Rwanda, Burundi and South Sudan.
Magufuli said "the situation in Burundi is not as bad as it has been described (by the ICC) because numerous Burundian refugees have already returned home", said the statement.
Museveni meanwhile accused the ICC of "interfering in the efforts of the EAC".
On Thursday, the ICC revealed that its judges had given the go-ahead for a full investigation into crimes allegedly committed in Burundi from April 26, 2015, to October 26, 2017, which is the day before the country's exit from the court.
The prosecutor can also widen the probe to acts committed both before and after those dates "if certain legal requirements are met", and even investigate other atrocities such as suspected "genocide or war crimes," under the decision.
The period this covers begins with Burundi's descent into unrest and bloodletting when President Pierre Nkurunziza announced he was running for a third term in office, winning July 2015 elections which were boycotted by the opposition.
According to estimates, "at least 1200 people were allegedly killed, thousands illegally detained, thousands reportedly tortured and hundreds disappeared", the ICC judges said.