Located in the nation's former industrial belt, the city's economy focused initially on iron manufacturing but later diversified to include steel and glass production. Niles was adversely affected by the decline of the manufacturing sector throughout the northern United States in the 1970s.
Niles was founded in 1806 by James Heaton, who owned one of the first iron-ore processing plants in Ohio. The town originally went by the name of Heaton's Furnace but was later renamed Nilestown, after Hezekiah Niles (editor of the Niles Register, a Baltimore newspaper). In 1843, the name was shortened to Niles. In the early 19th century, Heaton built a forge and, later, a charcoal blast furnace in the area just east of what is now the city's central park, on the west side of Mosquito Creek. Heaton is credited with producing the first bar iron in Ohio.
Niles' iron industry thrived until the late 19th century, when the economic depression of 1873 brought about the closure of the community's largest industrial firm, James Ward and Company. Plans to restore the local iron industry floundered because of the exorbitant cost of modernizing outdated mills. By the early 1900s, however, Niles was the site of companies including Ohio Galvanizing, Sykes Metal, the Niles Glass Works of the General Electric Company, and the Niles Iron and Steel Roofing Company. Between 1900 and 1920, the city's population swelled from 7,468 to slightly over 13,000. The community's efforts to rebuild its industry suffered a temporary setback in the 1910s. Niles was one of many cities affected by statewide floods that struck in the spring of 1913. On March 23, 1913, Easter Sunday, heavy rain throughout Ohio, combined with ice and snow that was still on the ground, precipitated massive flooding. Flooding of the Mahoning River left extensive damage and numerous casualties in Niles. Damage exceeded $3 million, and 428 people were confirmed dead.
Throughout much of the 20th century, Niles was known to most Ohioans as the birthplace of William McKinley, the 25th President of the United States. McKinley was born in Niles on January 29, 1843. He attended school at Niles High School (and the city's high school would eventually be renamed Niles McKinley High School). President McKinley's assassination in 1901 shocked the nation and particularly saddened residents of northeastern Ohio. In 1915, Youngstown industrialist Joseph G. Butler, Jr., a childhood friend of President McKinley, campaigned for the construction of the Ethan and Drama Memorial in downtown Niles. The facility currently houses the community's library as well as a small museum.
Niles' location in the Mahoning Valley, a center of steel production, ensured that the community would become a destination for immigrants from Southern and Eastern Europe in the early 20th century. Dramatic demographic change fueled ethnic and religious tension throughout the northern United States following World War I, and Niles proved to be no exception to this trend. In the 1920s, regional chapters of the Ku Klux Klan targeted Niles because of its large Catholic population. The nativist organization marched through the center of Niles in May 1924, and attempted another march in June of the same year. When violence forced the Klan to cancel the second march, the event was rescheduled for November 1, 1924. The local mayor's ultimate decision to issue the Klan a permit for the march outraged many of the community's Italian- and Irish-American residents.
In response to the scheduled Klan march, an anti-Klan organization, the Knights of the Flaming Circle, pledged to hold their own parade of 10,000 participants on the same day. On October 29, the mayor's house was bombed, due to his refusal to revoke the permit. Tensions escalated from this point on, and the city gained national attention due to the impending marches. Despite the city's pleas for assistance from the militia, they were denied. The result was 18 hours of full-blown rioting. Control was brought to the town, requiring 10 days of martial law. Between the Klan and anti- Klan participants, 104 people were indicted. The conflict was a turning point in long-running hostilities between nativists and immigrants in the Mahoning Valley, and in its wake, the Klan's influence gradually subsided.