Use when an action will cause future difficulties, often due to a lack of foresight. He's making a rod for his own back by ignoring his homework.
Pro Tip 2/3
Idiomatic Caution
It suggests a warning about the results of one's actions, typically used to advise someone. If you don't start studying, you're making a rod for your own back.
Pro Tip 3/3
Avoidable Trouble
It implies the trouble is self-inflicted and could be avoided with different actions. By procrastinating, you're just making a rod for your own back.