There is a sense of coercion – of having to – in the idea of execution of a task.

If we tend to be driven by our emotions this will come across in dreams | violence of any sort in dreams usually signifies that something is badly out of balance, so to dream of an execution may signify that we are acting (wrongly) more from an intellectual viewpoint than from a feeling perspective. You might also like to consult the entries for guillotine, punish / punishment and violence.