Stevens grew up in Washington, D.C. He enrolled as an undergraduate at Ohio's Oberlin College, from which he graduated in 1871; he then returned to his hometown to study law at Columbian University and Howard University, and was admitted to the bar association of the District of Columbia in 1873 in a class with Joseph E. Lee, Jacksonville, Florida's first black lawyer, Henry Wagner, US Consul at Lyons, France, William E. Matthews, John S. Leary, J. H. Smith, and John A. Moss His career with the Department of State began in October of that same year, when President Ulysses S. Grant appointed him secretary of the United States Legation at Tokyo, where he served under then-United States minister to Japan John Bingham. He enthusiastically accepted his new position, in part due to his fondness for learning new languages; he had previously studied Latin, Greek, French, and German. He was initially one of only three staff members at the Legation. He served as secretary until July 1883, and also took up the post of Charge d'Affairs ad interim in 1878–79, while Bingham was on home leave. After resigning his post, he returned to the United States.
In November 1883, Stevens entered the service of the Japanese Government as English Secretary to the Imperial Legation at Washington, a position which he obtained thanks to the influence his former superior Bingham had with the Japanese government. In 1884 he was ordered to Tokyo for service in the Foreign Office. In the winter of 1884–85 he accompanied Count Inoue Kaoru to Korea to assist in negotiations related to the murder of several Japanese citizens on Korean soil; for services rendered on that occasion, the Emperor Meiji awarded him with the Third Class of the Order of the Rising Sun. He was Bureau du Protocole of an 1885-87 Tokyo conference aimed at the renegotiation of unequal treaties imposed on Japan by Western countries; following the conference, he returned to Washington, D.C. with the rank of Honorary Counsellor of Legation. He served under Count Mutsu Munemitsu, then-Minister at Washington; during that time, he assisted in the negotiation of the treaty with Mexico, which was the first treaty made by Japan fully recognizing her right to exercise all the sovereign powers of an independent state.
Soon after the start of hostilities in the First Sino-Japanese War, Stevens published an article in the North American Review, in which he sought to justify the war by asserting that the "dry rot of Chinese conservatism" blocked Korea's development, and that a reduction of Chinese influence in Korea and a corresponding increase in Japanese power would result in social and commercial reform. For services rendered during the war, he received the Second Class of the Order of the Sacred Treasures. He travelled twice to Hawaii to represent Japanese interests there, once in 1901 and again in 1902. He was also decorated two more times by the Japanese government, the third time receiving the Second Class of the Order of the Rising Sun, and then in October 1904, the fourth time, being awarded the Grand Cross of the Sacred Treasure.
In November 1904, Stevens was appointed as adviser to the Korean Foreign Office. The Japanese government had urged the Korean government to appoint him to this position on the basis of the 1901 recommendation of Horace Allen. Stevens ignored several requests that a Korean consul be appointed in Hawaii; despite this, in 1905, Allen also commended Stevens to F.M. Swanzy, president of the Hawaiian Sugar Planters' Association; Swanzy was interested in seeing Korean emigration to Hawaii restarted. The Japanese government expected that Stevens supported their efforts to block Korean emigration to Hawaii, but he was initially open to the idea. He had several meetings with Swanzy in Tokyo in mid-1905 on the subject, but in the end, Swanzy's efforts were unsuccessful. Later that year, he issued a statement that Japan would welcome legislation restricting the entry of Japanese immigrants into the United States, and that they were also in favor of stopping movement to Hawaii, "provided it can be done in a manner that would not be offensive to Japan or that would not affect her dignity"; he stated that the Japanese government hoped to induce potential emigrants to settle in Korea or northeast China instead. While officially under the employ of the Joseon government, he purportedly continued to receive tens of thousands of dollars in payments from the Japanese in order to "advance Japanese propaganda" among the American people, according to South Korea's Ministry of Patriots' and Veterans' Affairs.
In early 1906, Stevens made a bet with Kiuchi Jūshirō, a Japanese official resident in Korea, about the length of time before Japan would annex Korea. Kiuchi expected it would only take three years; Stevens' guess of five years would prove to be more nearly correct, as the Japan-Korea Annexation Treaty was signed in mid-1910. However, Stevens would not survive to see his prediction come true.
Stevens returned to the United States in March 1908 to visit his family in Washington, D.C. and vacation with his sisters at a cottage they owned in Atlantic City, New Jersey. Upon his arrival, he gave an interview with a San Francisco newspaper in which he stated that the common people of Korea were benefiting from the increasing Japanese presence and protection in their country, and that, in the state that Korea was in, Korea was not fit to be a liberated country. These statements provoked the ire of two local associations of Koreans, the Daedong Bogukhoe and the Independence Club, who held a joint meeting in which they agreed that something had to be done about Stevens. On March 22, 1908, four Korean men chosen by the associations accosted Stevens at the Fairmont Hotel, where he was staying. Their leader, a man by the name of Earl Lee who was described as fluent in English, asked him if he had indeed made the statements attributed to him in the newspaper, and whether "Japanese were not killing off the Koreans". He answered yes to the first question and no to the second, then proceeded to tell Lee that he had "probably been too long away from his country to know the exact condition of the Government." Upon this, the four men began to strike Stevens with chairs, knocking him down and causing him to strike his head against the marble flooring; Stevens backed up against the wall until help arrived. After the assault, Lee was quoted as saying, "We are all very sorry that we did not do more to him."
The following day, Jang In-hwan and Jeon Myeong-un, both Korean immigrants to the United States, approached Stevens at the Port of San Francisco as he prepared to catch a ferry to make a rail connection in Oakland and attacked him. Jeon fired his revolver at Stevens first, but missed, and instead rushed at him, using his weapon as a club to hit Stevens in the face. However, Jeon was quickly subdued by Stevens. Jang, who was also seeking to assassinate Stevens, saw the fight and then fired into the melee, striking Stevens twice in the back; Jeon was also shot in the confusion. The crowd which had gathered urged that they be lynched on the spot; Jang was arrested and held without bail on a charge of murder, while Jeon was first hospitalized, and later charged as an accessory. In newspaper interviews after the attack, both Jeon and Jang offered no apology for the assassination, describing Stevens as a "traitor to Korea" and stating that "thousands of people have been killed through his plans".
One bullet had penetrated Stevens' lung, while another lodged in his groin; however, surgeons at the St. Francis Hospital initially expected that he would be able to make a recovery, and on the day of the attack he was apparently in good enough health to issue a statement to the press that the assault was "evidently the work of a small band of student agitators in and about San Francisco, who resent the fact that the Japanese have a protectorate over Korea and believe that I am to some extent responsible for this condition of affairs in their country". However, his condition began to deteriorate on the morning of March 25. His doctors, seeing signs of inflammation in his wounds, placed him under anesthesia and began to perform surgery at six that evening. He never regained consciousness after that, and died shortly after 11 PM, with Japanese Consul Chozo Koike at his bedside. He was buried in his hometown of Washington, D.C. after a funeral service at St. John's Episcopal Church; Secretary of State Elihu Root was among his pallbearers.
News of Stevens' assassination was greeted with sorrow in diplomatic circles in Japan and among American missionaries in Korea, to whom Stevens was well known; United States Ambassador to Japan Thomas O'Brien was quoted as saying that "the utmost grief is expressed by everyone", adding that he counted Stevens as a "true and useful friend". Yale University professor George Trumbull Ladd, in a letter to the editor of The New York Times, denounced the attacks as "cowardly and shockingly brutal", calling Koreans a "bloody race" and, comparing the Stevens case to a number of other assaults in Korea, such as that against American missionary George Heber Jones, concluded that politically motivated murders were not "an isolated or at all peculiar experience" in Korea, and stated that the events "furnish an instructive object lesson for the correct estimation of the Korean character and the Korean method of self-government".
Jang and Jeon both stood trial for Stevens' murder separately, as there was insufficient evidence to prove they had conspired with each other; Jeon was quickly acquitted of charges. The Korean community hired three lawyers to defend Jang, among whom one, Nathan Coughlan, eventually agreed to take on the case pro bono. During the trial, he planned to use Arthur Schopenhauer's theory of "patriotic insanity" to argue that Jang was not guilty by reason of insanity. The jury found Jang guilty of second-degree murder on 23 December of that same year. Later Korean accounts describe Stevens as a traitor to Korea and refer to Jeon and Jang as patriots and heroes.