The City of Walnut rests on what was once the Rancho La Puente and Rancho Los Nogales (later consolidated into the Rancho San Jose). The land was primarily used for cattle ranching and growing grains, grapes, beans, citrus, and walnuts. The area's first U.S. post office, the Post Office of Lemon, was established in 1895 on the site of a local post office, the Post Office of Hartford. The post office however changed its name to Walnut in 1908, allegedly as a reference to the Rancho Los Nogales (Ranch of the Walnut Trees), an area named for its naturally growing black walnut trees.
Walnut is home to Mount San Antonio College, a community college less than 2 miles west of the California State Polytechnic University, Pomona, on lands that were once part of the township of Spadra. In 1919, the state of California chose Spadra to be the home of a new mental hospital called Pacific Colony. The facilities saw use as a boys home, narcotics hospital, and an Army and Navy hospital before it became the campus for Mount San Antonio College in 1945. With the end of World War II, residents of the Pomona, Covina, La Puente, and Bonita school districts voted to start a junior college to serve the local population and returning soldiers.
Walnut residents voted to incorporate in 1959 out of fear of annexation by their neighbors West Covina and the City of Industry. The community sat largely undeveloped until the late 1980s, its population not even having yet reached 1,000 people at the time of incorporation. The decades that followed however filled much of the land with commercial areas and housing tracts as land developers began to take on Walnut's hilly landscape. Walnut reached its peak allowed population density in the early 1990s at 30,000, and has roughly retained those numbers since. A bedroom suburb, Walnut continues to maintain its small town community feel while moving forward with progressive ideals as indicated by its prospects to propose a new general plan for 2050 by the end of 2018.