My source is https://gedankenfrei.files.wordpress.com/2009/01/mein-weltbild-albert-einstein.pdf.
The quoted paragraph is a composite of sentences taken from two places in the essay. This first is the source for all but the last sentence:
He who joyfully marches to music rank and file, has already earned my contempt. He has been given a large brain by mistake, since for him the spinal cord would surely suffice. This disgrace to civilization should be done away with at once. Heroism at command, how violently I hate all this, how despicable and ignoble war is; I would rather be torn to shreds than be a part of so base an action.
The original German is on the seventh page of the linked file; the portion in square brackets is omitted from the quoted translation:
Wenn einer mit Vergnügen in Reih und Glied zu einer Musik marschieren kann, dann verachte ich ihn schon; er hat sein großes Gehirn nur aus Irrtum bekommen, da für ihn das Rückenmark schon völlig genügen würde. Diesen Schandfleck der Zivilisation sollte man so schnell wie möglich zum Verschwinden bringen. Heldentum auf Kommando, [sinnlose Gewalttat und die leidige Vaterländerei,]
wie glühend hasse ich sie, wie gemein und verächtlich erscheint mir der Krieg; ich möchte mich lieber in Stücke schlagen lassen, als mich an
einem so elenden Tun beteiligen!
A somewhat more literal translation:
If one can march joyfully in rank and file to music then I already despise him; he has received his large brain only by mistake, because for him the spinal cord is already fully sufficient. This shameful stain on civilization should be made to disappear as soon as possible. Heroism on command, [senseless commission of violence and the sorry patriotism,] how glowingly I hate them, how vulgar and contemptible war seems to me; I would rather be cut into pieces than to participate in such miserable conduct.
The last sentence:
It is my conviction that killing under the cloak of war is nothing but an act of murder.
This comes from page 87 of the linked file. Here's the whole paragraph, for context. All but the last sentence of the source is in square brackets because it is absent from the quoted translation:
[Ich war mir der furchtbaren Gefahr wohl bewußt, die das Gelingen dieses Unternehmens für die Menschheit bedeutete. Aber die Wahrscheinlichkeit, daß die Deutschen am selben Problem mit Aussicht auf Erfolg arbeiten dürften, hat mich zu diesem Schritt gezwungen. Es blieb mir nichts anderes übrig, obwohl ich stets ein überzeugter Pazifist gewesen bin.] Töten im Krieg ist nach meiner Auffassung um nichts besser als gewöhnlicher Mord.
Again, a somewhat more literal translation:
[I was well aware of the fearful danger that the success of this enterprise meant for humanity. But the probability that the Germans should work on the same problem with the prospect of success compelled me to this step. There remained nothing else for me, although I have always been a convinced pacifist.] Killing in war is, according to my perception, no better than ordinary murder.