Bolsonaro's remarks directly contradicted information on the museum's website saying Germany's Nazi movement rose out of right-wing radical groups responding to the rise of communism.
In Tuesday's televised comments, the Brazilian president echoed previous remarks by his country's foreign minister, Ernesto Araujo, also claiming the Nazis were leftists.
Asked by reporters if he agreed with Araujo, Bolsonaro said, "There is no doubt, right?"
He went on to say that the Nazi party's name was the National Socialist Party of Germany, which includes the word "socialist." The official name was the National Socialist German Workers' Party.
Despite their name, the Nazis followed a fascist and anti-Semitic - rather than a socialist - ideology.
Bolsonaro leaves Israel on Wednesday to return to Brazil. His four-day visit came just one week before Israel's election in which right-wing Prime Minister Benjamin Netanyahu is seeking re-election.
The visit had initially been seen as potentially boosting Netanyahu's election prospects but fell short of the Israeli prime minister's expressed hope that Brazil would move its embassy from Tel Aviv to Jerusalem.
Bolsonaro suggested soon after his inauguration in January that he would move the embassy, but his government later walked back the comments. Brazilian officials instead announced during his Israel visit that the country would open a trade office in Jerusalem.
Netanyahu has said he hopes the trade office is a step toward moving the embassy there as well.
The administration of US President Donald Trump, who Bolsonaro regards as an ally, recognized Jerusalem as Israel's capital in 2017 and ordered the American Embassy moved from Tel Aviv to Jerusalem, which took place last May.
Israelis and Arabs dispute the status of Jerusalem, which is holy to Jews, Christians and Muslims. Israel regards the city as its "eternal and indivisible" capital but that is not recognized internationally. Palestinians want Jerusalem to be the capital of an eventual Palestinian state.Jerusalem is home to Yad Vashem, which documents the Holocaust and is a memorial to the 6 million Jews murdered by Nazi Germany during World War Two.