The Soviet Union recognized the need for a modernized machine gun to replace the Maxim, and in the late 1920s Degtyarev began work on a “universal” type of gun. This would be air cooled, use standard Maxim belts and 7.62x54R ammunition, and used as a tripod mounted infantry gun, a vehicle mounted gun, and also as an anti-aircraft gun. The first prototype was delivered in 1930, and over the next 9 years it was tested and developed (including the addition of a Shpagin type rotary feed system). It was formally approved and adopted in 1939, and production began in June 1940 – just in time to see service in the Winter War against Finland.
Unfortunately, the testing that had made the gun look ready for service had not been adequate, and when DS39s reached the field they quickly began having major problems. In particular, the gun was plagued by out of battery detonations and a remarkable type of malfunction in which the bolt opened violently enough that it would pull the an unfired cartridge case out of its belt while leaving the bullet still in the belt. An investigation by Soviet ordnance found no suitable way to fix these problems on the fly, and production ceased only a year after it began. A total of just 10,345 were made, and the Red Army kept using its old 1910 Maxim guns instead. A new machine gun program was quickly put in place, and the result was the Goryunov SG-43 several years later.
The Finnish Army captured a quantity of DS39 machine guns during the Winter War, and VKT (the State Rifle Factory) actually came up with a number of improvements to the design, which were implemented on those guns in Finnish hands (unfortunately I don’t have details on just what those improvements were).