The Briton held off the challenge of Ibrahim Jeilan, who beat him to the gold medal two years ago.
"I had the experience from a couple of years ago," Farah told BBC Sport.
"I saw him [Jeilan] coming at the bell and I knew he was behind me. I needed to have something left in the tank and it was nice to beat him this time.
"I was working so hard on the final lap, I didn't want to lose again. I just made sure I didn't over-stride."
The title is Farah's first 10,000m gold medal at the World Championships.