Aleksey was a member of the Tolstoy family, and a second cousin of Leo Tolstoy. Due to his mother's closeness with the court of the Tsar, Aleksey was admitted to the future Alexander II's childhood entourage and became "a comrade in games" for the young Crown Prince. As a young man Tolstoy traveled widely, including trips to Italy and Germany, where he met Johann Wolfgang von Goethe. Tolstoy began his education at home under the tutelage of his uncle the writer Antony Pogorelsky, under whose influence he first became interested in writing poetry, and a number of other teachers. In 1834 Tolstoy enrolled in the Moscow Foreign Ministry State Archive as a student. In December 1835 he completed exams (in English, French and German languages and literature, Latin, World and Russian history, and Russian statistics) at the University of Moscow.
Throughout the 1840s Tolstoy led a busy high society life, full of pleasure trips, salon parties and balls, hunting sprees and fleeting romances. He also spent many years in state service as a bureaucrat and diplomat. In 1856, on the day of his Coronation, Alexander II appointed Tolstoy one of his personal aide-de-adjutants. Tolstoy served as an infantry major in the Crimean War. He eventually left state service in the early 1860s to pursue his literary career. He died in 1875 of a self-administered lethal dose of morphine at his Krasny Rog estate in the Chernigov Governorate.
Alexey Konstantinovich Tolstoy was born in Saint Petersburg to the famed family of Tolstoy. His father, Count Konstantin Petrovich Tolstoy (1780–1870), a son of the army general, was a Russian state assignation bank councilor. His mother, Anna Alekseyevna Perovskaya (1796–1857), was an illegitimate daughter of Count Aleksey Kirillovich Razumovsky (1784–1822), an heir of the legendary Ukrainian hetman Alexey Razumovsky. A. K. Tolstoy's uncle (on his father's side) was Fyodor Tolstoy (1783–1873). His uncle on his mother's side was Aleksey Perovsky (1787–1836), an author known under the pen name of Antony Pogorelsky. Aleksey Konstantinovich was a second cousin of Leo Tolstoy; Count Pyotr Andreyevich Tolstoy was their common great-grandfather.
Konstantin Tolstoy and Anna Perovskaya's marriage was short-lived; they divorced in October 1817. With her six weeks old son, Anna moved first to her own Blistava estate in Chernigov Governorate, then to Krasny Rog, an estate belonging to her brother Aleksey Perovsky, who became Aleksey Konstantinovich's tutor and a long-time companion. Common knowledge has it that Pogorelsky's famous fantasy fairytale The Black Chicken or The People of the Underground was premiered at home, his young nephew being the only member of Pogorelsky's audience. It was under the latter's influence that Aleksey started to write poetry, as early as 1823, inspired by some old books he found at home. Aleksey had good teachers and at the age of six he fluently spoke French, German and English. Later he learned Italian as well.