Buy was originally a trading post and protected by a hill fortress of Finno-Ugrian Meri people c. 400–500 CE. Its original Meri name is not known. It was inhabited by the Finno-Ugrian peoples at least up to the Mongol invasion of Russia in 1237–1238. During the Mongol threat, some inhabitants of Kostroma sought refuge in Buy, and it seems that they renamed the place Buy (Vui, Bui) instead of using the Finno-Ugrian name which was difficult for them to pronounce, but the origin of the Russian name comes from the old Meri name.
Modern Buy was founded in 1536 as a fortified point at the confluence of the Kostroma and the Vyoksa Rivers. The fortified point was built according to the order of Yelena Glinskaya, the regentess of Russia at that time and the mother of Ivan the Terrible, to defend the eastern frontiers of the Grand Duchy of Moscow from the raids by Kazan Tatars and others. However, twenty years after its construction, the fortress lost its military significance, as Kazan was taken and the raids ceased.
During Buy's first three and a half centuries, the population scarcely exceeded 2,000. Except for officials and priests, most inhabitants were peasants and small craftsmen. Cottage industries included pottery, iron, leather, felt, wool, carpentry, painting, blacksmithing, and oil pressing. These products were primitive and distribution was local; even export to a neighboring area was considered a commercial success.
One exception was the distillery, the predecessor of the current chemical plant. Almost the only factory in town, the distillery employed forty workers producing 600,000 liters of vodka annually. The soft bog water allowed the plant to produce a high-quality product which was sold even in provincial capitals.
Buy was granted town status in 1778, during the reign of Catherine the Great.
In 1905, a branch of the Saint Petersburg-Vyatka Railway (completed in 1908) reached Buy. At the same time, the railroad running north from Yaroslavl through Danilov arrived, so that Buy became a railroad junction town. The new Buy railway station was located 682 versts (728 km) from Saint Petersburg and 576 versts (614 km) from Moscow.
In 1914-1915 the Russians built a large POW camp for captured Austrian, Hungarian, and German prisoners of war. It was located 3 versts (3.2 km) south of Buy in Korega at the west bank of Kostroma River. After the Peace Treaty of Brest-Litowsk was signed on March 3, 1918 under the terms of Peace Treaty all prisoners of war were released. The camp was left empty.
After the end of the Finnish Civil War in 1918, many Finnish Reds who escaped into Soviet Russia were relocated to the Buy camp as their first place to create a Communist society. In May 1918 there were 3,268 Finns in Buy. Most of them relocated soon after, so that in July only about 500 remained. Few stayed in Buy, and some that did were deported during the Great Purge two decades later.
Костромская областная Дума. Закон №112-4-ЗКО от 9 февраля 2007 г. «Об административно-территориальном устройстве Костромской области», в ред. Закона №567-5-ЗКО от 24 сентября 2014 г. «О внесении изменений в Закон Костромской области "Об административно-территориальном устройстве Костромской области"». Вступил в силу со дня официального опубликования. Опубликован: "СП — нормативные документы", №10(70), 28 февраля 2007 г. (Kostroma Oblast Duma. Law #112-4-ZKO of February 9, 2007 On the Administrative-Territorial Structure of Kostroma Oblast, as amended by the Law #567-5-ZKO of September 24, 2014 On Amending the Law of Kostroma Oblast "On the Administrative-Territorial Structure of Kostroma Oblast". Effective as of the official publication date.).
Костромская областная Дума. Закон №237-ЗКО от 30 декабря 2004 г. «Об установлении границ муниципальных образований в Костромской области и наделении их статусом», в ред. Закона №496-5-ЗКО от 28 февраля 2014 г. «О внесении изменений в Закон Костромской области "Об установлении границ муниципальных образований в Костромской области и наделении их статусом"». Вступил в силу по истечении 10 дней со дня официального опубликования. Опубликован: "Северная Правда" ("Документы: СпецВыпуск"), №8, 26 января 2005 г. (Kostroma Oblast Duma. Law #237-ZKO of December 30, 2004 On the Establishment of the Borders of the Municipal Formations and on Granting Them Statuses, as amended by the Law #496-5-ZKO of February 28, 2014 On Amending the Law of Kostroma Oblast "On the Establishment of the Borders of the Municipal Formations and on Granting Them Statuses". Effective as of after 10 days following the official publication date.).