Courtois, part of the Belgium team that enjoyed their most successful ever World Cup, was due to return to training on Monday, but didn't show up.
Kepa replaces the departed Thibaut Courtois and will immediately take over the No.1 jerysey at Stamford Bridge.
"Athletic thanks the player for his contribution during the time he has remained in our club". The midfielder will join Jorginho in Chelsea's midfield who joined the Blues from Napoli.
Chelsea open their Premier League campaign at Huddersfield on Saturday, having suffered a 2-0 defeat to Manchester City in the Community Shield last weekend.
"Chelsea and Real Madrid have tonight agreed terms for the permanent transfer of Thibaut Courtois subject to the agreement of personal terms and passing a medical", Chelsea signalled in a statement published on the club's official website.
Chelsea were unwilling to part ways with Courtois unless they had an immediate, suitable replacement lined up, but made the move to let their Belgian leave and get the Kepa deal over the line before the start of deadline day.
Tottenham defender Toby Alderweireld has been eyeing a move away from the north London club and could be a target for United, who appear to have missed out on Bayern Munich's Jerome Boateng.