John Riley was born in London in 1646, one of the sons of William Riley. Nothing is known of his education. He studied painting with Isaac Fuller and Gerard Soest, but left them to set up his own practice as a portraitist when he was very young. Slow to acquire any great reputation, he was brought to the notice of Charles II after the death of Lely in 1680 but, diffident and uncourtierlike in temperament, did not achieve office until the accession of William and Mary in 1688, when he was appointed principal painter to the court jointly with Keller.
In about 1681 Riley engaged as his drapery painter and partner the immigrant German painter, John Closterman. The formal partnership was dissolved after a couple of years, but Closterman continued to work and to live with Riley, and finished several of his pictures after his death. Riley also employed Lely's drapery painter, John Baptist Gaspars. A brother who was a painter who lived with him was of little professional assistance. Riley's recorded pupils were Anthony Russell, Thomas Murray, Edward Gouge, and Jonathan Richardson Senior, who stayed with him four years, up to the time of his death, and managed his affairs following this event.
Reference to a purchase of a Van Dyck in 1681 suggests that he may have been a collector; he was a member of the Saint Luke's Club of Virtuosi. Nothing is known of his married life except his wife's first name, Jacobed. After suffering several years with gout, he died of this disease in London in March 1691.
[Hayes, John. British Paintings of the Sixteenth through Nineteenth Centuries. The Collections of the National Gallery of Art Systematic Catalogue. Washington, D.C., 1992: 225-226.]