Berzelius was born in the parish of Väversunda in Östergötland in Sweden. His father Samuel Berzelius was a school teacher in the nearby city of Linköping, and his mother Elizabeth Dorothea Sjösteen was a homemaker. His parents were both from families of church pastors. Berzelius lost both his parents at an early age. His father died in 1779, after which his mother married a pastor named Anders Eckmarck, who gave Berzelius a basic education including knowledge of the natural world. Following the death of his mother in 1787, relatives in Linköping took care of him. There he attended the school today known as Katedralskolan. As a teenager, he took a position as a tutor at a farm near his home, during which time he became interested in collecting flowers and insects and their classification.
Berzelius later enrolled as a medical student at Uppsala University, from 1796 to 1801. Anders Gustaf Ekeberg, the discoverer of tantalum, taught him chemistry during this time. He worked as an apprentice in a pharmacy, during which time he also learned practical matters in the laboratory such as glassblowing. On his own during his studies, he successfully repeated the experimentation conducted by Swedish chemist Carl William Scheele which led to Scheeles discovery of oxygen. He also worked with a physician in the Medevi mineral springs. During this time, he conducted an analysis of the water from this source. Additionally as part of his studies, in 1800, Berzelius learned about Alessandro Voltas electric pile, the first device that could provide a constant electric current (i.e., the first battery). He constructed a similar battery for himself, consisting of alternating disks of copper and zinc, and this was his initial work in the field of electrochemistry.
As thesis research in his medical studies, he examined the influence of galvanic current on several diseases. This line of experimentation produced no clear-cut evidence for such influence. Berzelius graduated as a medical doctor in 1802. He worked as a physician near Stockholm until the chemist and mine-owner Wilhelm Hisinger recognized his abilities as an analytical chemist and provided him with a laboratory.