Nikolai Avnilov was born in 1913 in Derbent, in a family of Mountain Jews. In 1930, he finished school and went to Rostov-on-Don in southern Russia, where he worked as a machine-tool operator at a factory for agricultural machinery. In 1932, Avnilov returned to Derbent and worked at the local People’s Court of Justice. In 1935, Avnilov was drafted into the Red Army. In 1937, when his term of service was over, he was appointed judge at the Derbent District Court of Justice.
In June 1941, the Soviet-German War broke out. As a judge, Avnilov had an exemption from military service. However, when he saw all his male relatives and close friends being recruited, he, too, volunteered for active service. In July 1942, he was assigned to the 768th Rifle Regiment (138th Rifle Division) as the commander of a mortar platoon. Originally, the 138th Division was supposed to defend the Transcaucasia, but it was transferred northward during the German advance across the North Caucasus to Stalingrad. With his 768th Regiment, Avnilov took part in the fighting at the Don River, as part of the Stalingrad Operation. Then, in 1943, he saw action in central Russia, and in the fall of that year he participated in the crossing of the Dnieper River. In 1944, he passed through Ukraine, and fought in the Carpathian Mountains that fall. It was there that Avnilov was awarded his Order of the Red Star.
On January 18, Nikolai Avnilov was killed in action near the city of Košice, Slovakia. He was buried at the Soviet military cemetery in Košice.