Almeria were leading 1-0 in the 39th minute at the Jose Burgos stadium, outside Malaga, Spain, when referee Javier Sanchez Carreras suspended the match.
A late challenge by Hearts left-back Alex Cochrane on Almeria's Alejandro Pozo caused the Spanish team's Rodrigo Ely to intervene and push Cochrane to the ground. That sparked an altercation involving both sets of players as coaching staff and officials tried to restore order.
Cochrane and Ely were sent off before the decision was taken to bring the friendly to a premature end.
"It was a very competitive game," Hearts manager Robbie Neilson told Hearts TV.
"All of a sudden on the far side there was a tackle from Alex [Cochrane]. I thought it was just a standard tackle, and then all hell broke loose, with their players running around, a forearm smash from their centre-half on Alex.
"The ref totally lost control of it. The benches were over and there were about 60 people on the pitch. It was just a bit of a shambles. We felt it's a preseason game, we've already got injuries, there's no point carrying on because tensions were extremely high, to say the least."
"There's always going to be a competitive edge but there's a line that can't be crossed," Neilson added. "I think they crossed it several times. The referee just didn't have any control, he was all over the shop. We couldn't get the game going again so we just felt what's the point."
Forward Dyego Sousa had put Almeria ahead in the 28th minute -- after earlier having a penalty saved -- before the game was called off.
"The red-and-whites were winning, but an ugly challenge from a Scottish player led to the referee's decision, at the opponent's request," Almeria said in a statement.
Almeria are 14th in LaLiga with the division on hold for the World Cup, while Hearts are fifth in the Scottish Premiership.