Without a casefile, it's hard to tell what happened. It seems like he filed an emergency petition, the question is SPECIFICALLY how did you find out about it. Where you served with a certified mail order or petition? Did you refuse service, if so that may have sealed the deal (Some people refuse these for fear they are lawsuits, and don't realize that refusing them doesn't do anything to stop the suit in question).
If an ex parte emergency order was granted, you are given time to get a full hearing on the issue (due process requirement). This means going to court and allowing the court to determine what's really going on.
In addition, I encourage you to watch my the video's on my profile page, specifically my "Custody Modification 101" video.
Best of luck & hope this helps.
Oh wow, he probably served papers at your last known Illinois address knowing you wouldn't find out about it. There may be a way to get it corrected (depending what exactly happened), but it would require you to travel back up to Illinois to do it - which by the sounds of it may not be something your able to do at the moment.
Since the order was entered there, and your ex & child reside there, then it must be filed there.
Sign up to receive a 3-part series of useful information and advice about child custody law.