Arnold controlled her
Arnold wanted to commit suicide and to close the park after realizing that the hosts have feelings and that they can truly suffer. He controlled Dolores and then made her kill him.
Dolores wasn’t consciously doing it
Ford made it clear later in the show that Dolores wasn’t the one taking the action. He said that it was Arnold doing it using Dolores’ body.
Dolores was Wyatt
Before his death Arnold programmed another personality into Dolores , Wyatt, which has the ability to kill humans ruthlessly. Arnold probably used Wyatt’s side of Dolores to kill himself.
Arnold wanted to die
After failing to convince Ford that the hosts have feelings and consciousness Arnold decided to commit suicide. He believed his death might prevent the park from being opened. (See Why do people binge-watch TV shows?)
It all depends on Ford’s story
If Ford was not telling the truth then something else could have happened to Arnold. Since Ford is the only one who knows the real truth it’s not possible to know whether that happened or not in season 1.
Some believe ford did it
According to some Fan theories Ford could have been the one who killed Arnold , using Dolores, because he had different intentions for the park. (See Why 13 Reasons Why TV is a good show?)
Some believe Dolores was conscious
According to another fan theory Dolores might have been conscious while doing that action. In such a case Dolores could have had her own motives.