Cary was born in Londonderry on 7 December 1888. His father, descended from an Anglo-Irish family whose fortunes had declined, was a civil engineer in England. However, the son spent long holidays in the Inishowen peninsula in Co. Donegal, though Castle Cary and other big houses had passed out of the family. At seventeen, with an inherited income of £300, Cary studied art in Edinburgh and Paris before decidmg that he could better express himself as a writer.

After reading law at Oxford, Cary set off in 1912 for Montenegro, serving as a Red Cross orderly in two Balkan wars. He had now met his future wife and, when work for Horace Plunkett's co-operative movement in Ireland did not lead to a permanent post, joined the Nigerian political service in 1913. During World War I he served with a Nigerian regiment in the Cameroons campaign until wounded. In 1920 he returned to England, settling in Oxford, where he died on 29 March 1957.

Although he had published some short stories under a pseudonym, Cary struggled for ten years to translate his view of life into a novel. Once Aissa Saved (1932) was completed, he wrote with great fluency. It drew on his African years, as did An American Visitor (1933), The African Witch(1936)and MisterJohnson(1939), the last a memorable portrait of a native clerk. Ireland inspired Castle Corner(1938) and A House of Children (1941),an evocation of summers in Inishowen which won the James Tait Black prize.

Cary next drew on the art world for a complex trilogy, in which each book is narrated by one of three main characters. Herself Surprised, To Be a Pilgrim and The Horse's Mouth (1941-4) are notable for the anarchic painter Gulley Jimpson. A second, more sombre trilogy dealt with politics: Prisoner of Grace, Except the Lord and Not Honour More (1952-5). A trilogy on religion was to follow, but Cary was dying; a single, uncompleted novel, The Captive and the Free, was published in 1959.

Cary's concern for artistic and political liberty also found an outlet in treatises such as The Case for African Freedom (1941) and Art and Reality (1956). He returned to Africa in 1943 to script the film Men of Two Worlds, and films were also made of The Horse's Mouth (1958) and Mister Johnson (1990).