Stenhammar was born in Stockholm, and was the brother of architect Ernst Stenhammar. He received his first musical education in Stockholm. He then went to Berlin to further his studies in music. He became a glowing admirer of German music, particularly that of Richard Wagner and Anton Bruckner. Stenhammar himself described the style of his First Symphony in F major as "idyllic Bruckner". He subsequently sought to emancipate himself and write in a more "Nordic" style, looking to Carl Nielsen and Jean Sibelius for guidance. The latter's Symphony No. 2, especially, had a great effect on him, leading him to change his style and withdraw his own First Symphony from performance. Having seen Sibelius's symphony performed in Stockholm, Stenhammar wrote to him:
You should know that you are in my thoughts daily ever since I heard the symphony. You magnificent person, it is of course a huge armful of wonder that you brought up out of the unconscious and ineffable depth. That which I felt has been verified: You are in this moment for me as the foremost, the only, the enigmatic one.... I have also just written a symphony. At least it is called a symphony, and only in accordance with the understanding that you perhaps have forgotten should it be dedicated to you. However, nothing came of it. It is quite good, but somewhat superficial. I yearn to reach my inner self. And you can wait until I have arrived there. The great day when this happens, I will print your name in large letters on the title page. It may become a symphony or something else.
The result of his search for a new style was the Second Symphony in G minor, composed nearly twelve years after the First Symphony, which shows the influence of Nielsen, Sibelius and Franz Berwald among others.
From 1906 to 1922 Stenhammar was Artistic Director and chief conductor of the Gothenburg Symphony, the first full-time professional orchestra in Sweden. In this capacity, he organised many performances of music by contemporary Scandinavian composers. In 1909, he briefly held the position of director of music at Uppsala University, where he was succeeded the following year by Hugo Alfvén.