In Ravel's lifetime, this was his only known sonata for violin and piano; but in 1897 he had composed an earlier one-movement work for the pairing, the 'Sonate posthume' or 'Sonate no.1', which remained however unperformed and unpublished until 1975.
This work in three movements was begun in 1923 but not completed until 1927; apart from the musical problems which it presented (he apparently threw away one completed version of the last movement, thinking it was too like the first), it was also interrupted by his contractual requirement to finish his opera L'Enfant et les sortilèges.
During the work's composition, Ravel often talked of it to Hélène Jourdan-Morhange, for whom the violin part was intended, and to whom the work is dedicated. However, by the time of its completion, she was no longer able to perform, and the first performance was given in 1927 by Georges Enesco with Ravel at the piano.
Ravel reflected on the independence and incompatibility of the two instruments which he saw as fundamental to his writing in the Sonata: "Je me suis imposé cette indépendance en écrivant une Sonate pour piano et violon, instruments essentiellement incompatibles, et qui, loin d'équilibrer leurs contrastes, accusent ici cette même incompatibilité." (Ravel, ).
The aspect of the work which has generally attracted most comment is the second movement, entitled "Blues", with its use of jazz sounds and rhythms, reflecting his interest in the growth of jazz in Paris cafés and nightclubs during the 1920s. Other examples appear in his music in the foxtrot in L'Enfant et les sortilèges (1925), and in the Concerto pour piano et orchestre en sol majeur (1932).