I used to work in the flooring industry and the best cleaner on the market can be purchased at The Home Depot or Lowe's - it's called Motsenbocker's Lift Off. They make several different varieties for different types of stains. Really hot, clean water on clean rags should help to thin it out and lift it up, first - you may need to blot it and leave the soaking wet rags on top of it for awhile before you start blotting. If you have a very stiff scrub brush that will not ruin your carpet fibers that will help - try working from the base of the carpet straight upward, instead of scrubbing in side to side motions.
It will be important to get all of it out. Even if the syrup is no longer leaving a discolored stain, any sticky residue will collect other dirt and fibers making a new "stain" appear.