Just one week after beating Al Unser Jr. by .0024 seconds -- the closest margin in auto racing history -- Hornish became locked in a wheel-to-wheel battle with Castroneves for the lead and the title over the last 10 laps at Texas Motor Speedway.
With neither driver giving in, the two fought in a fierce battle until Hornish was able to inch ahead just before the start-finish line.
"It's great to be able to win the IRL title for the second straight year," Hornish said. "I owe this to all my guys. They did a great job all season long."
Hornish became the first driver in the IRL's seven-year history to win the championship twice. He was pushed by Castroneves, a CART star who made the jump with Marlboro Team Penske.
"This shows you how competitive it has been all year and Sam drove a terrific race," said Roger Penske, Castroneves' team owner. "What a way to finish, fighting like that for the last 25 laps. I'm proud to be a member of the IRL and it was a great way to end it."
Castroneves did all he could to win the race and the championship, but could not keep Hornish from inching ahead at the end.
"Wow, what a fantastic series," Castroneves said. "I wanted to win the championship, but he was the best. It's great to finish a season like that. I tried really hard, but there is always next year. That was incredible. It couldn't be more exciting.
"What a great finish, racing side-by-side until the last lap."
Driving a Dallara/Chevrolet, Hornish averaged 163.981 miles per hour in his eighth IRL victory, tying Buddy Lazier for the all-time lead. He has won four of the five closest races in IRL history.
Pole-sitter Vitor Meira was third, followed by Scott Sharp and Alex Barron. There were 21 lead changes among seven drivers.
In addition to winning the $1 million season championship, Hornish earned $125,400 for the victory.
Castroneves led six times for 92 laps, compared with eight for 79 for Hornish.
Hornish passed Robbie McGehee for the lead on lap 44 and began to pull away from the field. By lap 66, he was 3.6 seconds ahead of Castroneves.
Hornish pitted on lap 86, giving the lead to Castroneves. Three laps later, Jeff Ward and Hideki Noda crashed in the second turn to bring out a caution flag. Castroneves, who had stayed out, pitted under caution and kept his lead while Hornish dropped to eighth.
When the green flag waved, Hornish was seventh but 20th on the track with lapped traffic. That meant he had to make up a lot of ground to get back to the front.
"I thought we had everything under control about 80 laps into it, 85 laps into it," Hornish said. "I came in, pitted and hoped we'd get through that without getting caught on a yellow. When that happened, we were behind from there.
"We were lucky enough that it happened at a time when we were only one lap down, so when the leaders pitted, we were actually back on the lead lap, but deep in traffic. We had to figure out where the car worked the best at. That actually helped me there towards the end on knowing where I needed to position my car to be able to make a run at Helio at the end."
Hornish was able to use the high line to work past lapped traffic and get back within striking distance. He moved into fourth by passing Felipe Giaffone in the third turn on lap 125.
After climbing to third, Hornish was boxed in by Castroneves' teammate, Max Papis, as he tried to pass Unser on lap 140. But two laps later, Hornish made the pass on the backstretch to take second.
Hornish was able to pass Castroneves on lap 146, bringing a large roar from the crowd. One lap later, Castroneves passed him back. On lap 151, Castroneves' lead over Hornish was just one ten-thousandth of a second.
Two laps later, Hornish pitted for the final time. Castroneves made his last pit stop on lap 159.
By the time the field cycled through the final pit sequence, Castroneves was in front of Hornish. On lap 176, Hornish passed Castroneves and was in front for four laps. The drivers traded the lead six times over the final 24 laps in a dramatic championship showdown.
"It was just a tough race all the way down there because Helio didn't want to lose and I didn't want to lose," Hornish said. "We were both out there pushing real hard, trying to get a win.
"There's not a better way that I could ask to win a championship than by winning a race, two races in a row."
In the closing laps, the cars even made slight contact as neither driver would give in. The racing was hard, fast, fearless and clean. It was auto racing at its finest.
"I got a doughnut on my wheel slip," Hornish said of the contact. "I got `Firestone' rubbed off of my left front tire. Two times I said, `What are you doing?' to myself. Helio and I ran really close. He didn't want to give me any more room than I wanted to give him."
Although Castroneves came up inches short of his ultimate goal, even he could enjoy the drama.
"Definitely, I gave my blood," Castroneves said. "The only thing I didn't try was get out of my car and try to push, which I don't think would help.
"What a great result. Definitely, it was a great show."
Celebrity Families of 2014 [PHOTOS]