Kazakevich was born on 16 December 1902 in Radzetse village in Vilna Governorate. He lived in Omsk during his childhood and teenage years. After graduating from high school, he worked as a factory carpenter. In June 1920 he was drafted into the Red Army. Between June and December he served with the 186th Rifle Regiment, fighting in the Polish-Soviet War and the campaign against the army of Stanisław Bułak-Bałachowicz. Kazakevich then served in the Belomorsky Military District and Siberian Military District.
Interwar
In 1923, Kazakevich graduated from the Minsk Infantry Training Courses. Between 1923 and 1924 he was assistant chief of a border post in the Belorussian Border District. In 1924, he became head of a border post of the 42nd Jabrayil Border Detachment. He joined the Communist Party of the Soviet Union in 1925. Kazakevich became head of a border post of the 38th Akhaltsikhe Border Detachment in 1926. In 1927 he was sent to the Higher School of Border Troops and graduated in 1929. He then became chief of the 21st Yampol Border Detachment. Between 1932 and 1934 he was head of the courses at the 2nd Kharkov Border School. He was sent to the M. V. Frunze Military Academy and graduated in 1937. On 14 March 1936 he was promoted to Captain. He then became commander of an NKVD motor rifle regiment in the Khabarovsk Border District. On 29 November 1938, he was promoted to Major. From 1939, Kazakevich was chief of staff of the border district. On 13 March 1940, he was promoted to Colonel. He received the Order of the Badge of Honour on 14 February 1941.
In December 1942, Kazakevich was appointed chief of staff of the Far Eastern NKVD Rifle Division, formed from border troops. In February 1943 the division was renamed the 102nd Rifle Division. In the summer of 1943, Kazakevich fought in the Battle of Kursk and Operation Kutuzov. On 27 August, he was awarded his first Order of the Red Banner. In September, he became commander of the 399th Rifle Division. Kazakevich led the division during the Chernigov-Pripyat Offensive, part of the Battle of the Dnieper. It helped capture Novozybkov in September. In November, the division fought in the Gomel-Rechitsa Offensive. On 3 June 1944, Kazakevich was promoted to Major general and was awarded the Order of Kutuzov 2nd class. From June 1944, the division fought in Operation Bagration. It fought in the Bobruysk Offensive in late June, during which it helped capture Babruysk and then participated in the Minsk Offensive in early July. On 23 July, Kazakevich was awarded the Order of Suvorov 2nd class. The division then fought in the Lublin–Brest Offensive and from 3–8 September, the division broke through German defenses on the Narew approaches, advanced to the river near Różan and seized a bridgehead. The division reportedly repulsed several counter-attacks. For his leadership, Kazakevich was awarded the title Hero of the Soviet Union and the Order of Lenin on 6 April 1945. On 3 November 1944, he was awarded a second Order of the Red Banner. From January 1945, the division fought in the East Prussian Offensive. In late January, the division participated in the Mlawo-Elbing Offensive. On 10 February, Kazakevich was awarded a third Order of the Red Banner.
Postwar
In 1945, Kazakevich returned to the Border Troops and became deputy chief of the Black Sea Border District. On 10 December, he was awarded a second Order of Lenin. In 1946 he transferred to the same position in the Moldovan Border District. In September 1948 Kazakevich became commander of the district at Chișinău. On 11 October 1949, he was awarded the Order of the Red Banner of Labour. On 24 November 1950, Kazakevich was awarded his fourth Order of the Red Banner for 30 years of service. He was awarded a fifth Order of the Red Banner on 14 February 1951. He graduated from the All-Union Correspondence Institute of Law in 1952. In April 1954 he transferred to command the Southwestern Border District in Lviv. Between 1954 and 1958 he was a deputy of the Supreme Soviet of the Soviet Union at its 4th convocation. From October 1955 to October 1957, he was chief advisor to the East German Border Troops. On 15 July 1957, he was promoted to Lieutenant general. In October 1957 he returned to the Soviet Union and became chief of the military educational institutions of the Border Troops. In October 1959, he retired and worked in the Intourist Directorate. He lived in Moscow and received the Order of the October Revolution on 6 December 1982. On 6 April 1985, he was awarded the Order of the Patriotic War 1st class on the 40th anniversary of the end of World War II. Kazakevich died on 28 November 1988 and was buried at the Mitino cemetery.
Legacy
On 25 March 2011, a Belorussian Presidential Decree named the 12th Border Post of the Grodno Border Group after Kazakevich. On 4 January 2013 a bust of Kazakevich was unveiled at the border post.