The makeshift Danish side, captained by third-division forward Christian Offenberg, gamely defended waves of Slovak attacks and made several attempts on goal of their own.
The debutant team ultimately lost 3-0 in Trnava without the likes of Christian Eriksen and Kasper Schmeichel, who led them to the last 16 of the World Cup.
Replacement goalkeeper Christoffer Haagh, who is registered with fifth-tier club Jægersborg Boldklub and plays for Denmark’s international futsal team, made several heroic saves to keep the Slovaks, led by Napoli star Marek Hamšík, from adding to their goal tally.
The alternative team trailed 2-0 at half time and were closing in on a goalless second half before substitute Adam Fogt, a political science student who is also a futsal player, put the ball into his own net after the tiring defenders failed to deal with a cross from the left.
Denmark are due to face Wales on Sunday in their first game of the inaugural UEFA Nations League.
They could have to rely on the same players unless the standoff between the Danish players' union and national federation over commercial rights is resolved.
Coach Åge Hareide has been replaced for the two matches, with Euro 92 winner John Jensen in temporary charge.
“We must hold the two national matches to avoid millions of fines and possible exclusion of the national team for several years,” said Kim Hallberg, director of the Danish Football Association (DBU).
“On behalf of DBU and Danish football, I am pleased that John Jensen has taken the hard task of being coach in both matches,” he added.
In 2017, the Danish women's team boycotted a World Cup qualifier against Sweden over salary disputes, leaving Denmark at risk of being banned by UEFA if they cancel another match.