Akelaitis was born in near Marijampolė to a family of peasants. His father participated in the Uprising of 1831 and was sentenced to exile in Siberia where he died. Akelaitis' stepgrandfather fought in the Battle of Maciejowice during the Kościuszko Uprising while his grandfather's brother served in the Polish Legions in Italy and fought in the Battle of Somosierra in Spain during the Napoleonic Wars. Orphaned Akelaitis grew up with his grandparents and stories of these campaigns. His mother obtained a housekeeper's job in Marijampolė where Akelaitis took private lessons with a local priest and an organist in Sasnava. He then enrolled into a primary school in Marijampolė which he graduated at age 17. He continued studies at the four-year secondary school in Marijampolė where he was continuously ranked as one of the best students, but quit without graduating around 1850. He continued to self-study learning several languages. In addition to his native Lithuanian, he learned Polish, Russian, German, French, Latin, some Greek, Sanskrit, and Hebrew.