What is the source of the house-rule 18-moves? In my area, most kids including me grew up with a very popular house-rule: After all the pieces of either of the players are removed besides the king, the opposing player has 18 moves to checkmate him. If he can't do that, the game is a draw.

The rule is popularly called 18-moves.

I have spent some time googling and have not found this rule anywhere.

Does anyone know a source for this rule and why it's so popular?
I grew up in Spain and we used a 20 "move rule" instead of 18.

We played exactly as you said, if a player is left with a single king, the other has to mate in 20 moves or less to win the game. However, this "rule" only applied in friendly matches and was never enforced in tournaments. Our coach made us play like this for several reasons:


It promotes critical thinking at an early stage, where you have to look for faster ways to checkmate your opponent than just queening your two remaining pawns and checkmate using the "staircase" method.
It avoids humiliating the opponent, since now promoting all the remaining pawns to minor pieces and playing around with the king is no longer an option. We were around 6 years old, so once you knew you had won  you wanted to enjoy it longer. This kind of demeaning behavior was discouraged.
It avoids elongating the game more than necessary. We trained without clocks, which could make us spend unnecessary time in trivial positions.


This practice then naturally extended to our friendly games, but we were well aware that this was not an official rule and that on tournaments the 50 move rule applied.