Hummel was born in Pressburg, Kingdom of Hungary, then a part of the Austrian Habsburg Monarchy (now Bratislava in Slovakia). His father, Johannes Hummel, was the director of the Imperial School of Military Music in Vienna and the conductor there of Emanuel Schikaneder's theatre orchestra at the Theater auf der Wieden; his mother, Margarethe Sommer Hummel, was the widow of the wigmaker Josef Ludwig. He was named after St John of Nepomuk. At the age of eight, he was offered music lessons by Wolfgang Amadeus Mozart, who was impressed with his ability. Hummel was taught and housed by Mozart for two years free of charge and made his first concert appearance at the age of nine at one of Mozart's concerts.
Hummel's father then took him on a European tour, arriving in London where he received instruction from Muzio Clementi and where he stayed for four years before returning to Vienna. In 1791 Joseph Haydn, who was in London at the same time as young Hummel, composed a sonata in A-flat major for Hummel, who gave its first performance in the Hanover Square Rooms in Haydn's presence. When Hummel finished, Haydn reportedly thanked the young man and gave him a guinea.
The outbreak of the French Revolution and the following Reign of Terror caused Hummel to cancel a planned tour through Spain and France. Instead, he returned to Vienna, giving concerts along his route. Upon his return to Vienna he was taught by Johann Georg Albrechtsberger, Joseph Haydn, and Antonio Salieri.
At about this time, young Ludwig van Beethoven arrived in Vienna and himself took lessons from Haydn and Albrechtsberger, thus becoming a fellow student and a friend. Beethoven's arrival was said nearly to have destroyed Hummel's self-confidence, though the latter recovered without much harm. The two men's friendship was marked by ups and downs, but developed into reconciliation and mutual respect. Hummel visited Beethoven in Vienna on several occasions with his wife Elisabeth and pupil Ferdinand Hiller. At Beethoven's wish, Hummel improvised at the great man's memorial concert. It was at this event that he made friends with Franz Schubert, who dedicated his last three piano sonatas to Hummel. However, since both composers had died by the time of the sonatas' first publication, the publishers changed the dedication to Robert Schumann, who was still active at the time.
In 1804, Hummel became Konzertmeister to Prince Esterházy's establishment at Eisenstadt. Although he had taken over many of the duties of Kapellmeister because Haydn's health did not permit him to perform them himself, he continued to be known simply as the Concertmeister out of respect to Haydn, receiving the title of Kapellmeister, or music director, to the Eisenstadt court only after the older composer died in May 1809. He then remained in the service of Prince Esterházy for seven years before being dismissed in May 1811 for neglecting his duties. He then returned to Vienna where, after spending two years composing, he married the opera singer Elisabeth Röckel in 1813. The following year, at her request, was spent touring Russia and the rest of Europe. The couple had two sons. One of them, Carl (1821-1907), became a well-known landscape painter.
Hummel later held the positions of Kapellmeister in Stuttgart from 1816 to 1819 and in Weimar from 1819 to 1837, where he formed a close friendship with Goethe, learning among other things to appreciate the poetry of Schiller, who had died in 1805. During Hummel's stay in Weimar he made the city into a European musical capital, inviting the best musicians of the day to visit and make music there. He brought one of the first musicians' pension schemes into existence, giving benefit concert tours when the retirement fund ran low. Hummel was one of the first to agitate for musical copyright to combat intellectual piracy. In 1832, at the age of 54 and in failing health, Hummel began to devote less energy to his duties as music director at Weimar. In addition, after Goethe's death in March 1832 he had less contact with local theatrical circles and as a result found himself in partial retirement from 1832 until his death in 1837.