Javier Marías was born in Madrid. His father was the philosopher Julián Marías, who was briefly imprisoned and then banned from teaching for opposing Franco (the father of the protagonist of Your Face Tomorrow was given a similar biography). Parts of his childhood were spent in the United States, where his father spent time teaching at various institutions, including Yale University and Wellesley College. His mother died when Javier was 26 years old. Marías's first literary employment consisted in translating Dracula scripts for his maternal uncle, Jesús Franco. He was educated at the Colegio Estudio in Madrid.
Marías wrote his first novel, Los dominios del lobo (The Dominions of the Wolf), at the age of 17, after running away to Paris. His second novel, Travesía del horizonte (Voyage Along the Horizon), was an adventure story about an expedition to Antarctica. After attending the Complutense University of Madrid, Marías turned his attention to translating English novels into Spanish. His translations include work by Updike, Hardy, Conrad, Nabokov, Faulkner, Kipling, James, Stevenson, Browne, and Shakespeare. In 1979 he won the Spanish national award for translation for his version of Sterne's Tristram Shandy. Between 1983 and 1985 he lectured in Spanish literature and translation at the University of Oxford.
In 1986 Marías published El hombre sentimental (The Man of Feeling), and in 1988 he published Todas las almas (All Souls), which was set at Oxford University. The Spanish film director Gracia Querejeta released El Último viaje de Robert Rylands, adapted from Todas las almas, in 1996. Marías, however, later wrote that the film adaptation was not to his liking and this resulted in a permanent estrangement between him and the director and her father, Elias Querejeta, who had produced the film.
His 1992 novel Corazón tan blanco was a great commercial and critical success and for its English version A Heart So White, translated by Margaret Jull Costa, Marías and Costa were joint winners of the 1997 International IMPAC Dublin Literary Award.
The protagonists of the novels written since 1986 are all interpreters or translators of one kind or another. Of these protagonists, Marías has written, "They are people who are renouncing their own voices."
In 2002 Marías published Tu rostro mañana 1. Fiebre y lanza (Your Face Tomorrow 1: Fever and Spear), the first part of a trilogy which forms his most ambitious literary project. The second volume, Tu rostro mañana 2. Baile y sueño (Your Face Tomorrow 2: Dance and Dream), was published in 2004. On 25 May 2007, Marías announced the completion of the final instalment, entitled Tu rostro mañana 3. Veneno y sombra y adiós (Your Face Tomorrow 3: Poison, Shadow and Farewell). It was released on 24 September 2007.
Marías's novel, Todas las almas (All Souls), included a portrayal of the poet John Gawsworth, who was also the third King of Redonda. Although the fate of this monarchy after the death of Gawsworth is contested, the portrayal by Marías so touched the "reigning" king, Jon Wynne-Tyson, that he abdicated and left the throne to Marías in 1997. This course of events was chronicled in his "false novel," Dark Back of Time. The book was inspired by the reception of Todas las almas by many people who, falsely according to Marías, believed they were the source of the characters in Todas las almas. Since "taking the throne" of Redonda, Marías has begun a publishing imprint named Reino de Redonda ("Kingdom of Redonda").
Marías has conferred titles during his reign, including upon Pedro Almodóvar (Duke of Trémula), António Lobo Antunes (Duke of Cocodrilos), John Ashbery (Duke of Convexo), Pierre Bourdieu (Duke of Desarraigo), William Boyd (Duke of Brazzaville), Michel Braudeau (Duke of Miranda), A. S. Byatt (Duchess of Morpho Eugenia), Guillermo Cabrera Infante (Duke of Tigres), Pietro Citati (Duke of Remonstranza), Francis Ford Coppola (Duke of Megalópolis), Agustín Díaz Yanes (Duke of Michelín), Roger Dobson (Duke of Bridaespuela), Frank Gehry (Duke of Nervión), Francis Haskell (Duke of Sommariva), Eduardo Mendoza (Duke of Isla Larga), Ian Michael (Duke of Bernal), Orhan Pamuk (Duke of Colores), Arturo Pérez-Reverte (Duke of Corso), Francisco Rico (Duke of Parezzo), Sir Peter Russell (Duke of Plazatoro), Fernando Savater (Duke of Caronte), W. G. Sebald (Duke of Vértigo), Luis Antonio de Villena (Duke of Malmundo), and upon Juan Villoro (Duke of Nochevieja).
In addition, Marías created a literary prize, to be judged by the dukes and duchesses. In addition to prize money, the winner receives a duchy. Winners: 2001 John Maxwell Coetzee (Duke of Deshonra); 2002 John H. Elliott (Duke of Simancas); 2003 Claudio Magris (Duke of Segunda Mano); 2004 Eric Rohmer (Duke of Olalla); 2005 Alice Munro (Duchess of Ontario); 2006 Ray Bradbury (Duke of Diente de León); 2007 George Steiner (Duke of Girona); 2008 Umberto Eco (Duke of la Isla del Día de Antes); 2009 Marc Fumaroli (Duke of Houyhnhnms).
Marías operates a small publishing house under the name of Reino de Redonda. He also writes a weekly column in El País. An English version of his column "La Zona Fantasma" is included in the monthly magazine The Believer.
Marías was elected to seat R of the Real Academia Española (Royal Spanish Academy) in 2006. At his investiture in 2008 he agreed with Robert Louis Stevenson that the work of novelists is "pretty childish," but also argued that it is impossible to narrate real events, and that “you can only fully tell stories about what has never happened, the invented and imagined.”