Danila Kozlovsky was born in Moscow. His mother, Nadezhda Zvenigorodskaya, is a stage actress, and his father, Valery Kozlovsky, was a professor at Moscow State University specializing in marketing and mass communications. He has an older brother, Yegor, and a younger brother, Ivan. From a young age, Danila was placed in dance and music classes, learning to play the saxophone and the alto. During his early years, he frequently changed schools, potentially due to discipline issues. He made his big screen debut in 1998, playing the troubled sixth grader Denis on the Russian television series Simple Truths.
In 1996, he was accepted into the Kronshtadt Naval Military School, which he attended until his graduation in 2002. Upon graduation, he matriculated to the Saint Petersburg State Theatre Arts Academy, entering the acting/directing course supervised by Lev Dodin. During his fourth year he made his debut on the stage of the Little Drama Theatre (Theatre de l’Europe), playing the part of Edgar in King Lear (2006). The role brought him his first theatre award: a special prize of Expert Council of the "Golden Sofit" (the top-rated theatre award in Saint Petersburg) for Best Debut.
In the same year he also received his first movie award – the Russian Cinema Critics Guild "White Elephant Award" for the best leading role (in the movie Garpastum, 2006). He received the National "Golden Eagle Award" for "Dukhless" (2012, nomination "Best Cinema Actor").
In 2014, he played Dimitri Belikov in his first American movie, Vampire Academy. In 2015 he will portray the role of Erast Fandorin, in The Decorator, based on the novel in same name by Boris Akunin. Thus, after he played the role of Egor Dorin, in movie The Spy, based on another Akunin novel.
He also appeared in advertisements for Chanel Coco Mademoiselle alongside Keira Knightley.