"Do what thou wilt shall be the whole of the law." This statement is taken from the first chapter verse 40 of the The Book of the Law, also know as Liber al vel Legis, which is claimed to have been communicated to Aleister Crowley by a discarnate entity known as Aiwass on April 8, 9 and 10 in 1904, in Cairo, Egypt.
Later in Crowley's life he claimed that Aiwass was his Higher Divine Genius or Guardian Angel and that therefore he held complete authority to interpret the work.
During his life Crowley wrote two commentaries on the The Book of the Law. The interpretation of this particular passage consumed a considerable portion of his life, as it had become one of the signature statements that defined his new religion, Thelema.
At first view it looks to give license to do anything one would want, but after closer more critical examination this is doubtful. "'Do what thou wilt' need not only be interpreted as license or even as liberty. It may, for example, be taken to mean ... the sign of the cross. The passage may then be read as a charge to self-sacrifice or equilibrium." (Crowley, p. 97) This statement is taken from Crowley's first commentary.
In Crowley's second commentary he viewed this passage through the lens of sexual liberation and the emancipation of women from patriarchal domination. This was illustrative of Thelema's positive outlook on human sexuality.
NB: This is a nodeshell rescue.
Crowley, Aleister (1993) The law is for all. Phoenix, Arizona: New Falcon Publications