The South African-born batsman's poor form saw him dropped on Tuesday night.
Pietersen broke the news by posting a message on Twitter which said: "Done for rest of summer!! Man of the World Cup T20 and dropped from the T20 side too.. Its a fuck up!!"
The outburst angered national selector Geoff Miller, who may still reprimand the 30-year-old for the incident.
Pietersen will play the remainder of the season at Surrey after the ECB brokered a loan deal with his parent county Hampshire.
Of his tweet, he told Surrey TV: "It was something that wasn't meant for the public domain and I apologise for it entering the public domain and I also want to apologise for the language I used."