The history of lethal injection is an interesting and horrible one. Lethal injection was first suggested as a procedure in 1888, by an American doctor, incidentally a year after the abolition of capital punishment in Maine. In some ways, lethal injection has always been a very American thing. At the time, victims were executed through hanging- and hanging is not nice. Whether it involves horrible damage to the neck and asphyxiation, whether it's public or private, hanging is frankly gruesome as hell. And although some society didn't mind- or even supported- that aspect of it, a subset certainly did, and tried to find less gruesome, more 'humane' methods, or at least more humane in their eyes, such as electrocution or, indeed, lethal injection.
However, for a variety of reasons, this never went far. Lethal injection is and was expensive- especially compared to hanging. It was not necessarily less gruesome. It leant a more medical air to execution than some people would have liked. It was more personal, as someone would have been actively injecting the victim, which didn't allow the distance and removal from the death that hanging did, even for the hangman. It was an unattractive option for accountants and executioners alike.
But the medical air of lethal injection certainly appealed to some people. Nazi Germany dabbled with lethal injection as well. It was used in the murder of the severely disabled, including young children and babies, where the victims would be injected with a number of toxic substances, such as phenol. Originally this eugenics program killed infants, before expanding to include older children, teenagers and eventually adults. Parents at first did not understand what was going on- sending severely disabled children to institutions and asylums was the norm for Germany at the time, as parents often didn't have the ability or facilities to safely care for their children, and some also sent their children to asylums out of shame or embarrassment. They were told their children had died of natural diseases- influenza, pneumonia, heart conditions- and that was that. Eventually, some parents and communities realised what was happening, so many children dying, and began to refuse to send their children to institutions. But there was enormous pressure to do so, put on by the Nazi government, with parents threatened with their children being removed from their care, or the father being sent to the Eastern front, which was almost a death sentence at some points in the war.
From 1939, Aktion T4, which was the planned, systematic murder of the mentally, intellectually and developmentally disabled, was expanded to adults, first those found in the Polish institutions being overrun by the SS, and then across Germany. The majority were shot or gassed, not killed through lethal injection as the children were.
Why was lethal injection the chosen method of murder, for children in particular? Lethal injection carried a reputation of being painless (it wasn't) and it made the procedure medical. A doctor, a paediatrician, who had spent his life working with and saving children, might have found it difficult to allow a child to be shot in the head. But it might have rested easier on their consciences if a child died from a Luminol overdose. It would have seemed less like killing, more like euthanasia, being medicalised, sanitary and 'civilised'. Indeed, for these reasons, lethal injection appealed to a number of people, not just in Germany or America, but also in the UK.
In the late 1940s, the British Royal Commission on Capital Punishment was considering the use of the lethal injection- it not having yet been used. The British Medical Association rejected the suggestion, on the grounds that it was cruel and certainly painful, but also because associating anything medical with death was going to be a big PR mistake. The BME did not want that medical air to be added to capital punishment, and the doctors who would administer the dosage would not have been keen- actively ending lives goes against most people's morals, and even if they support capital punishment, lethal injection confronts the executioner with the reality of the act in a way that hanging, gassing or firing squad doesn't allow, although more modern methods, through lethal injection machines, have removed this problem.
Lethal injection was only actually used in a democratic country, openly and legally (eg not Nazi Germany) in 1982, but was first suggested in 1977, a year after capital punishment was once more resumed in the US, and the same year an execution was actually carried out for the first time since the resumption, that of Gary Gilmore, executed by firing squad, in Utah, and ten years after the previous execution in America, in 1967, that of Luis Monge by gassing. In 1972, the use of capital punishment was ruled to be unconstitutional, due to it being considered a cruel and unusual punishment, and although it was reinstated in 1976, there was certainly a need for a method of execution which would not be seen as cruel or unusual, and lethal injection- passing away peacefully and painlessly whilst unconscious- was ideal.
The state medical examiner of Oklahoma, one Jay Chapman, who was also a doctor, suggested lethal injection as a form of execution, believing it would be less painful. His plans were approved by a leading anaesthesiologist, also of Oklahoma, named Stanley Deutsch, and the form of lethal injection was to involve a fast acting barbiturate and induced chemical paralysis. It was soon adopted into the Oklahoma state criminal system, and the supposed relative painlessness and the medicalised, scientific form of execution apparently appealed both to the general public- who could see themselves as supporting a clean, humane procedure, compared to a brutal, violent one such as hanging, electrocution or the gas chamber, which was used in American history, which could be associated with the Holocaust as well as having a reputation for causing suffering- as well as other state governments, being quickly adopted across the US.