DOVER, Del. - Denny Hamlin was in the clear, in his head and on the track.

Hamlin put a weekend of illness behind him, turning a lap of 160.121 mph Friday at Dover International Speedway to win his first pole of the season.

He suffered from a migraine headache and dehydration in the Coca-Cola 600 on Sunday night in Charlotte, the result of both a busy weekend packed with golf and tennis, and a leaky exhaust in the No. 11 car that made him lightheaded.

"I felt like I kept up with my fluids pretty well last week, but obviously it wasn't enough," Hamlin said. "I've got to go above and beyond. The conditions and the car didn't make things very easy for me."

Hamlin made qualifying look easy on the mile oval.

He edged Martin Truex Jr. on the final qualifying run to take the top spot for the 21st time in his career. Hamlin was the lone driver to hit 160 mph.

"Our car has shown speed all day long, which is something we haven't had lately, so we're kind of building and getting a little bit better and starting to figure out our setups," Hamlin said.

Truex, who has one of his two career Sprint Cup wins at Dover, joined Hamlin on the front row. Truex is off to the best start of his career and has been inching closer toward a checkered flag.

He has 11 top-10s in 12 races and three top-fives. He led 95 laps at Kansas before fading to ninth and led 131 last week at Charlotte before he settled for fifth.

Truex is trying to snap a winless skid that stretches 68 races to the event on June 23, 2013, at the Sonoma road course. He thought he had enough for the pole.

"We thought we were in good shape, and then right there, I went to go for it and for some reason the car just got really tight laying it down in the corners," Truex said.

Kyle Larson was third, fellow JGR driver Matt Kenseth fourth, and Joey Logano fifth.

Hendrick Motorsports failed to land a car in the final round of qualifying for the second straight race. Nine-time Dover race winner Jimmie Johnson will start 14th.

Hamlin led the way for Joe Gibbs Racing, which placed all four cars in the first five rows. Carl Edwards, who won the Coca-Cola 600, was eighth and Kyle Busch 10th. Hamlin won the All-Star race last weekend for JGR and fought through his illness the next week for a top-10 finish.

Edwards was relieved he broke through for JGR and could deliver a win to help lock him in the Chase for the Sprint Cup championship.

"It took about 24 hours for me to really realize we can go to Dover and just hangout and have some fun," he said. "We don't have to worry. We get to go to all these tracks that I really love like Sonoma and Watkins Glen, just work on stuff and have fun racing. It took me a little while to shift my mindset from digging in and getting points runs to, 'Hey we're in this thing.' It's pretty cool."