Ogilby was established as a siding on the Southern Pacific Railroad in 1877, and by November had a cistern, section house, tool house, cook house, and bunkhouse - likely only used by Chinese rail workers. In the 1880s, following gold discoveries at nearby Hedges, Ogilby developed as a shipping point to transport ore to San Francisco. By 1895, the town grew to include a post office, depot, express office, grocery store, and freight house.

As Hedges diminished after the turn of the century, so did Ogilby. The population dropped from 21 in 1901 to 8 in 1907. Nevertheless, the Ogilby post office continued to operate - now taking in mail for Hedges, whose post office closed in 1905, as well as Glamis, another railroad stop whose post office closed in 1901.

After the reestablishment of Hedges in 1910, now called Tumco, Ogilby got a small boost. In addition, a 1916 replacement of the 1912 Plank Road 9 miles to the southwest brought growth to Ogilby when a plant was built to fabricate sections of the new road. After its completion, Ogilby again waned as it depended on nearby mines.

By the 1930s, only 36 registered voters remained in Ogilby, though this number probably includes those from Glamis as well. The depot burned in 1932, never to be replaced. A new school was built, replacing an earlier boxcar structure, but Ogilby's downslope continued. Increased usage of highways made the railroad less important, and in 1942 Ogilby lost its post office. By 1946, trains no longer stopped and that year the school district was suspended due to lack of students. By the 1950s & 60s, Ogilby was abandoned. The school was moved to Felicity in 1959, and by 1962 no buildings were left. Only two foundations remain, as well as a cemetery dating to 1878 - supposedly a Chinese cemetery from the early days.