The secretary of state, in London for talks with Prime Minister Gordon Brown, was accompanied in her performance of Brahms by Foreign Secretary David Miliband's wife Louise, and three members of the London Symphony Orchestra.
Rice is an accomplished pianist who started playing when she was a child.
A palace spokeswoman told AFP that Rice "expressed a wish to play at Buckingham Palace and the queen offered her to play in the music room."
The queen listened to part of the private performance and afterwards, presented Rice with a recording of the recital as a present.