U.S. authorities on Tuesday arrested three men who allegedly engaged in a scheme to steal millions of dollars in cryptocurrency, duping U.S. banks and a major cryptocurrency exchange in the process.

Esteban Cabrera Da Corte, Luis Hernandez Gonzalez, and Asdrubal Ramirez Meza were charged by the U.S. attorney’s office in Manhattan with a variety of offenses, including wire fraud and aggravated identity theft.

The three men, residents of Miami, bought more than $4 million in cryptocurrency by opening accounts with a leading cryptocurrency exchange using photos of fake U.S. passports and drivers’ licenses, according to an unsealed indictment.

The accounts were linked to bank accounts controlled by the trio. After purchasing the cryptocurrency, the men quickly transferred it to cryptocurrency wallets outside of the exchange. They then called the banks and said the purchases were unauthorized, prompting the banks to reimburse them.

The banks involved ultimately processed more than $4 million in fraudulent reversals. The cryptocurrency exchange, which wasn’t identified by prosecutors, lost more than $3.5 million worth of digital currency.

The defendants withdrew the money they gained from the scheme through wire transfers, cashiers’ checks and ATM withdrawals. By doing so, they defrauded the cryptocurrency exchange of both the cryptocurrency purchased, since it was transferred to external wallets, and the funds used to purchase it, prosecutors said.

The scheme took place over several months in early 2020, according to the indictment. The men were apprehended partly as a result of the investigative work done by the Department of Homeland Security’s El Dorado Task Force, a decadeslong program focused on money laundering.

Messrs. Cabrera, Hernandez and Ramirez couldn’t be immediately reached for comment. The men will appear in U.S. District Court for the Southern District of Florida, the U.S. attorney’s office said.

Write to Dylan Tokar at dylan.tokar@wsj.com