As I understand it, MAJ Hasan is charged with 13 counts of premeditated murder under Article 118 (snip from MCM IV-62-63):

43. Article 118—Murder

a. Text of statute.

Any person subject to this chapter who, without justification or excuse, unlawfully kills a human being, when he—

(1) has a premeditated design to kill;
.......
is guilty of murder, and shall suffer such punishment as a court-martial may direct, except that if found guilty under clause (1) or (4), he shall suffer death or imprisonment for life as a court-martial may direct.

b. Elements.

(1) Premeditated murder.

(a) That a certain named or described person is dead;

(b) That the death resulted from the act or omission of the accused;

(c) That the killing was unlawful; and

(d) That, at the time of the killing, the accused had a premeditated design to kill.
.....
c. Explanation.
.....
(2) Premeditated murder.

(a) Premeditation. A murder is not premeditated unless the thought of taking life was consciously conceived and the act or omission by which it was taken was intended. Premeditated murder is murder committed after the formation of a specific intent to kill someone and consideration of the act intended. It is not necessary that the intention to kill have been entertained for any particular or considerable length of time. When a fixed purpose to kill has been deliberately formed, it is immaterial how soon afterwards it is put into execution. The existence of premeditation may be inferred from the circumstances.

(b) Transferred premeditation. When an accused with a premeditated design attempted to unlawfully kill a certain person, but, by mistake or inadvertence, killed another person, the accused is still criminally responsible for a premeditated murder, because the premeditated design to kill is transferred from the intended victim to the actual victim.
While the word "motive" is not mentioned above, the need to prove a "premeditated design" makes a "motive" a nice thing to be able to prove.

That being said, the "premeditated design" is simply "the formation of a specific intent to kill someone and consideration of the act intended." The killing could be totally motiveless ("...just cuz I wanted to do Bubba with a .45, just cuz"), and still meet the elements.