Ainsley came to Campbell in the late 1880s and first worked in the orchards and drying yards. He experimented with canning in his backyard sheds, and his brother Tom sold the fruit in England. He married Alcinda Shelly in 1894.
He lived in three Campbell houses: a Queen Anne cottage now on North Third Street, a Victorian moved to North Second Street, and the 1925 Cotswold-style house now on Grant Street. He is credited with being the first to market canned fruit salad.