Step one is be smart about picking him. You don't want to fuck around with AM when the other team has super hard counters like Bloodseeker or Riki. Anything where you know they're going to wreck you, and you specifically, before like 25 minutes. I find that even supposed counters like PA, Void, or Ursa you can kind of fight around and be smart about.
It's kind of hard to quantify what is and isn't a good AM game based on picks, but generally I look for this:
If you've done those 4 things right, you should probably be okay to pick AM. It also rules out most games. Obviously you can't always wait to pick last but you can get a sense from the first few picks as to whether your team is going to be okay (decent mid, a support or two, nobody trying to jungle Zeus or anything), and whether the other team is going to be really scary to play against (tanky heroes, long silences, low mana pools, minus armor, high physical damage).
You can be less of a tightass about those requirements obviously; sometimes somebody randoms Lone Druid or Meepo and they can't micro to save their life so they just feed all game, but you don't know that at the pick screen and I'm just telling you the safest way to play it. I hate losing with AM, I don't know why--probably because of muh precious 70% winrate--and I'd rather lose with other heroes, so I'm hesitant to pick him.
That's probably the most important part, is picking your battles, but there are other things you can do in the early and mid game to help as well.
Or you could not listen to me and just play the hero a bunch and learn what works and what doesn't. That's probably better than just trying to imitate some random guy on the internet. Download some replays from Black, Illidan, or Beesa and watch their player perspective.
Source: Bunch of games at a little under 4k MMR, was ranked 250th on Dotabuff.