Ontario, the largest city in Malheur County, is on the Snake River near the Oregon state line. As the first city that people encounter when crossing into Oregon from Idaho on Interstate 84, Ontario has adopted the slogan "Where Oregon Begins."

Although Oregon Trail pioneers crossed the Snake River about fifteen miles south of Ontario (near present-day Nyssa), the town was not founded until 1883, when the area was still part of Baker County. In 1883, four residents of Baker City—William Morfitt, Daniel Smith, James W. Virtue, and Mary Richardson—claimed adjoining sections of desert land with the intention of platting a town. Part of Virtue's claim was deeded to the Idaho-Oregon Land Improvement Company, headed by Abraham Caldwell, who had the authority to establish a train station for the Oregon Short Line Railway, a subsidiary of the Union Pacific Railroad that eventually ran from Granger, Wyoming, to Portland. Those five individuals developed the town site of Ontario, which Virtue named in honor of his home province of Ontario, Canada.

In 1884, William Morfitt built the first frame building in Ontario and drew up a contract with the Nevada Ditch Company to supply the town with irrigated water. A post office was also established that year, with Morfitt as the first postmaster. Several stores opened in anticipation of the arrival of the Oregon Short Line, which was connected to Ontario in the winter of 1884-1885. Nearly all of the stock and wool shipments from eastern Oregon producers were shipped through Ontario, and its stockyard became the largest on the Short Line. By June 1899, the average daily value of shipments of cattle sent out of Ontario was $25,000, a strikingly high value (the equivalent of approximately $746,000 in 2016).

Malheur County was carved out of southern Baker County in 1887, and a fight ensued over where to locate the new county seat. Vale won over Ontario by popular vote in 1888. The question was presented to the electorate in multiple elections until 1913, when Ontario finally conceded defeat. 

The Oregon legislature incorporated Ontario on February 11, 1899, and the town continued to grow and prosper throughout the twentieth century as a shipping and supply point for eastern Oregon. The town had 200 residents in 1890, a number that has increased in almost every census since then. The population in the 2010 census was 11,366. 

In 1903, the town launched a salmon hatchery on Morton Island in the Snake River, which at the time still saw significant runs of salmon. As eastern Oregon developed, however, and a series of dams was constructed to supply water for agriculture, the hatchery failed after salmon were blocked from reaching it.

Ontario built a hospital in 1912, a city hall in 1913, fire and police department buildings, and a series of city parks during the interwar period, as well as a golf course in 1938. The town's first newspaper was the Atlas, followed by the Malheur Gazette and the Argus, which has been Ontario’s daily newspaper since 1900.

During World War II, Ontario came to national attention for welcoming Japanese Americans to settle in the region. The town's mayor, Elmo Smith (who would become the twenty-seventh governor of Oregon), said that since the government had determined that Japanese and Japanese Americans could not live on the coast, then “it appears downright cowardly to take any other stand than to put out the call, ‘Send them along; we'll cooperate to the fullest possible extent in taking care of them.’” Subsequently, Ontario's population of 134 Japanese Americans ballooned to a thousand during the war years, most of whom found jobs as agricultural workers during the wartime labor shortage. (Some incarcerated Japanese Americans also found work in Ontario when they were granted leave from Minidoka, the concentration camp in Idaho, to help the agricultural harvest in areas outside of the demilitarized zone.) A Japanese American Citizens League remains active in Ontario today, and the town has a sister city, Ōsakasayama, in Japan.

Agriculture continues to dominate Ontario’s industry, particularly russet potatoes, sugar beets, and onions. One of the town's primary employers is the Heinz Frozen Food Company, which annually produces over 600 million pounds of potato products and employs approximately a thousand people. Other major employers are the Snake River Correctional Institute, which opened in 1991 and holds 3,000 beds (the largest in Oregon), and Treasure Valley Community College, which opened in 1962 and serves approximately 7,500 students each year. The Four Rivers Cultural Center, a 10,000-square-foot museum and community space, celebrates the diverse settlement patterns in the Ontario region, including exhibits on Northern Paiutes, Basques, Japanese, Hispanics, and EuroAmericans.

Notable former residents of Ontario include Governor Elmo Smith; Charles C. Gossett, an Idaho senator (1945-1946) and governor (1945); Randall B. Kester, an associate justice on the Oregon Supreme Court (1957-1958); and novelist and poet Phyllis McGinley.