Who ultimately was the person responsible for the killing of Nicholas II and his family? Why would they kill his entire family and not just him? From my understanding, Nicholas II was a decent husband and father but an ineffectual monarch. Was he killed because of something he did specifically or was he just in the wrong role at the wrong time during Russia's transformation to communism?
Although the details of who exactly ordered the execution and when are incredibly murky and clouded by various politicized accusations, the decision to execute the imperial family in Yekaterinburg was very heavily predicated on exigent factors. Despite his abdication, Nicholas II was still a highly potent symbol inside the splintering Russian state.
The Bolshevik government in Moscow favored putting Nicholas on a show trial. Although Nicholas II often found himself led by events through his reign, he was still the autocrat of Russia and bore some responsibility for the actions of his government. His qualities as a father and husband was actually a facet of his life that was quite hidden from the public. Both Lenin and Trotsky favored a public trial that would be broadcast via radio, but there was also a significant pressure from below to put Nicholas II to task for his alleged crimes. There were a number of petitions generated by the Petrograd Soviet calling for "Nicholas the Bloody" to be put on trial and this Soviet was responsible for pressuring the Provisional Government in March 1917 from allowing the tsar to leave for Britain. Letting the tsar and his family flee in exile to Britain or another Allied country was off the table for the Bolsheviks after the November Revolution as much of their constituency on the left wanted to see Nicholas II pay for events like "Bloody Sunday" of 1905, the activities of the Black Hundred ultranationalists, and his responsibility for Russia's entry into the First World War.
But the events of the Russian Civil War precluded the option of a show trial. The war created both chaos and a danger that the imperial family would be liberated. Yekaterinburg was in between both Omsk, where a provisional government of various White forces (Kadets, SRs and monarchists) and Samara where the White-allied Czech Legion was operating in 1918. The fear that animated the Romanovs' captors was that any member of the imperial family could be used as a rallying figure for the Whites. Although Moscow had held out hope for the possibility of a trail as late as July, the fear was that White forces would take the decision out of their hands.
Whether or not Moscow directly ordered the execution or if the chain of command extended to Lenin himself, or was the decision of the Ural Regional Soviet is still unclear. It is telling though that the first Bolshevik official pronouncements of the execution justified the execution on the basis of advancing Czechoslovak forces and lied by saying only the tsar was executed while his "wife and son have been sent to a secure place." This helped fuel the myth that some of the royal family escaped.
Source
Steinberg, Mark D., and Vladimir M. Khrustalèˆv. The Fall of the Romanovs: Political Dreams and Personal Struggles in a Time of Revolution. New Haven, CT: Yale University Press, 1995.