The Fiorentina midfielder, 20, received the ban after explaining to coach Sinisa Mihajlovic that he would not sing the anthem out of principle and did not plan on changing his position, the federation said.
The federation insisted this contravened a "point of agreement" that Ljajic had signed in order to make him eligible for selection for the national team. However, the door to the team was not closed, and Ljajic will be invited back should he promise to join in with the singing in the future, the federation said.
Ljajic made his Serbia debut in 2010 and has seven caps. The team failed to qualify for Euro 2012, finishing third in Group C behind Italy and Estonia. Ljajic was mired in controversy earlier this month when his sarcastic hand-clap at being substituted in a Serie A game led Fiorentina coach Delio Rossi to lose his patience and punch the winger in the dugout.
Photos: Vaani Kapoor, Poonam Pandey, Sana Khan at fashion event
Photos: Rishi Kapoor, wife Neetu, daughter Riddhima at book launch
How Angelic! 10 stunning pics of birthday girl Angelique Kerber
Photos: Sunny Leone, Shraddha Kapoor, Shriya Saran at Mumbai airport
Spotted: Shah Rukh Khan at Mehboob Studio