A manager who rides and nitpicks your every move is potentially threatening your productivity. A boss who oversteps the bounds of respect is creating difficulties instead of solving problems. If your boss is constantly giving you a hard time, take appropriate measures to get the problem manager off of your back, and you'll have the space you need to work.
Avoid Taking It Personally
When your boss is giving you a hard time, don't take it personally. If you do, chances are you may lash out, adding hostility to an already volatile situation. If it's apparent that you are frustrated or angry, it might make the situation worse. The important thing to remember is to maintain a level-headed manner and focus on your tasks.
Before you take any retaliative action, make sure your performance isn't warranting your boss to ride you. Just because a boss appears to be micromanaging doesn't necessarily mean that they are trying to make your life miserable, it is also possible that they feel you're not tapping in to your full potential. Review your past performance and ensure you're up to standard.
Do the Best You Can
People who nitpick and micromanage at every opportunity are averse to excess information. Put your best efforts into your work, ensuring that your boss doesn't have to worry about your performance and you take your work just as seriously as he does. If you keep putting out your best and prove to them that you are self-motivated and can take initiative, he may leave you be.
Talk to Your Boss
Your boss may have concerns that he or she hasn't articulated yet. You may have suggestions about how your boss can tweak his management style to make things easier all around. Or, you just may want an opportunity to diplomatically let the boss know you're uncomfortable in your work situation. Whatever the message, communicate it to your boss in an informal chat or with a scheduled meeting to see if you can work things out. If a face to face conversation doesn't seem advisable, consider putting some constructive comments in writing and sending a memo.
Talk to a Supervisor
If your performance is up to par, but your boss still continues to ride you, then it's time to discuss the situation with your boss's supervisor. Explain your situation diplomatically, discussing how your boss is affecting not only your growth but the company's. Instead of demanding something be done, ask for guidance. You may just find your overbearing boss problem melts away.