With 99 percent of precincts reporting, Chandler had 119,845, or 50.1 percent, to Lexington attorney Andy Barr's 119,245, or 49.8 percent.
Chandler told supporters, "We have won in a historic night" around the country. Barr said the race was "too close to call" and promised to continue fighting for the seat on Wednesday.
Five other Kentucky incumbents — four Republicans and a Democrat — cruised to re-election Tuesday night.
The race was being watched nationally as a possible indicator of how Republicans would do nationally. Kentucky's polls closed at 6 p.m. local time, making them among the first to close in the country.