Mercedes is in the Rio Grande valley on U.S. Highway 83 twenty-five miles east of McAllen in southeastern Hidalgo County. The site was first settled by ranchers in the late 1770s and was part of the Llano Grande Spanish land grant issued on May 29, 1790, to Juan José Ynojosa de Ballí. During the 1850s it was the location of the Anacuitas ranch, owned by Ramón and Manuel Cavazos. Apparently by the beginning of the 1900s it was replaced by the Fuste ranch, which was owned by the Cavazos family, alleged heirs of Ynojosa de Ballí. Lon C. Hill, Jr., a local land promoter and developer, owned 45,000 acres extending sixteen miles from the Rio Grande and including the site of what is now Mercedes. Hill, in preparation for developing the area, cleared land and constructed the Estarito Canal. On May 29, 1904, he formed the Capisallo Town and Improvement Company to develop the town of Capisallo a mile east of what is now Mercedes. Hill promptly renamed his new community Lonsboro and sold his company to the American Rio Grande Land and Irrigation Company, which renamed the new town Díaz. The town's name was changed three more times, until the name Mercedes was finally adopted. The origins of the name have been disputed. While some sources assert that the town was named in honor of the wife of Mexican president Porfirio Díaz, there is no evidence that Díaz was ever married to a woman named Mercedes. When, on July 8, 1904, Mercedes became the first town on the Sam Fordyce Branch of the St. Louis, Brownsville and Mexico Railway, it was nicknamed the Sweetheart of the Branch.
To ensure a strong economic center for the new town, the Rio Grande Company placed restrictions on building permits on Main Street and on residential lots. Business structures were to be constructed of brick, stone, or concrete and cost no less than $3,000, and residential units were to cost no less than $2,000. Furthermore, it was stipulated that no alcoholic beverages could be sold in the town for fifteen years after its inception. The Company promoted Mercedes by luring northern settlers to the area with extensive publicity campaigns. They also transported prospective buyers to the area via railroad and gave them whirlwind tours of the surrounding Rio Grande Valley area. Grape culture was introduced to the area in 1907, followed by large-scale production of citrus fruits and truck crops. That year the first hotel in the town was also opened. By 1908 Mercedes had a population of 1,000 and a school, a lumberyard, a feed store, a livery stable, and a weekly newspaper, the Enterprise. The town's first bank, the Hidalgo County Bank, was established in 1908 and had deposits totaling $100,000 by the end of the next year. Mercedes incorporated in 1909, the same year in which it was inundated by a devastating flood. The Mercedes Commercial Club was organized in 1911 and was active in publicizing the town. That year also the Mercedes Public Library was founded. A new city charter was adopted in 1914, and by 1915 the population of the town was estimated to be 2,000.
Camp Mercedes and Camp Llano Grande, located outside the town, were home to 15,000 soldiers during World War I. On April 15, 1918, the Mercedes City Council passed an ordinance making it illegal during the duration of the war for anyone to speak German or any other language used by the enemy, "in any school, public or private"; it was also made illegal "to advertise any trade, profession, or business by name or sign or to preach, lecture, or entertain in the German language." Mercedes had an estimated population of 3,414 in 1925. A new city charter was adopted in 1931. In 1935 oil was discovered in the Mercedes field, and the town's population grew to 7,624 by 1940. Mercedes had the best harvest season of all Valley towns in 1947–48, when it handled more than 2,000 carloads of produce. On September 17, 1952, Mercedes and Weslaco businessmen organized the B&P Bridge Company and awarded a construction contract for a new international bridge. Construction was begun that fall at the Progreso bend in the Rio Grande and was completed by the fall of 1953. By 1952 Mercedes had a population of 10,065 and 252 businesses. During the 1960s Mercedes was a center for cotton, vegetable, and livestock marketing and processing. Other industries included meat packing, box and boot making, and farm-chemical manufacturing. In 1961 the town's population was 10,943. By 1970 the number of businesses there was 140. During the 1980s Mercedes was best known for its annual Rio Grande Valley Stock Show and for the large number of nationally renowned bootmakers located there. In 1980 the city's population was 10,354, and in 1990 it was 12,694. In 2000 the town reported 377 businesses and 13,649 residents.