Peru's foreign ministry recalled Carlos Urrutia from Caracas on Thursday, saying Chavez's meeting this week with Ollanta Humala, the nationalist presidential candidate, "constitutes interference in the internal affairs of Peru".
The Venezuelan government, however, denied that it was playing favourites in Peru's presidential vote on 9 April.
The foreign ministry said in a statement: "We are profoundly respectful of other nations' sovereignty."
The recall was made after Humala made an unexpected appearance in Caracas on Tuesday at a ceremony in which Chavez congratulated Evo Morales, the president-elect of Bolivia.
Chavez praised Humala for becoming involved in "this battle that unifies nationalism".
The Venezuelan leader said that shared "nationalism" was the "saviour of sovereignty" against the threat of a regional free trade agreement with the United States, which Peru's government, headed by Alejandro Toledo, signed last month in Washington.
Humala is a retired lieutenant-colonel who led a short-lived military uprising of 50 men against Alberto Fujimori, the former president, in 2000. A month later the 10-year-old Fujimori government collapsed amid charges of corruption and human rights violations.
No official invitation
He and Chavez have both expressed deep admiration for Peru's leftist military government that ruled from 1968 to 1975 and attempted agrarian reform, nationalised industries and forged close military ties with the Soviet Union.
Venezuela, however, said Humala visited Caracas at the invitation of pro-Chavez political parties, but had not been formally invited by the government.
The foreign ministry said: "The reference that President Hugo Chavez made to Ollanta Humala can in no way be interpreted as interference by Venezuela in the affairs of the Republic of Peru."
It said it expected that relations between the two South American nations would not be strained by the incident.
However, Humala, who has recently surged in polls in the run-up to the presidential elections in April, seized on the diplomatic dispute to call on Peru's leftist social forces to join his campaign.