 Melgar has been a regular on the Guatemala national team, for which he has competed at the youth, Olympic, and full international levels.Tournaments in which he partaked include the under-17 and under-20 World Cup qualifying, the 1999 Pan American Games, the 2000 Olympic tournament qualifying and the Central American Games of 2002.He made his senior debut in a January 2002 friendly match against Cuba and has earned a total of 56 caps (including a non official game against Argentina), scoring 1 goal.