The earliest quote in the OED for this expression is from 1743:
When they promise it [sc. protection], they put their hands up to their turbants, as much as to say, Be it on their heads.
A description of the East, and some other countries
However, I think I found an earlier example from 1711:
If you dissemble, be it on your head
The maids tragedy
The expression "on your head", however, is much older than the longer expression (and apparently comes from the Latin expression in caput eius meaning "onto his/her head"). Since Old English, it was used in the sense "Of a misfortune, curse, blessing, etc.: directed towards a person; so as to affect a person; on a person." (OED):
Gehweorfe his sar on his heafod [L. in caput eius], and on his brægn astige his unriht.
King Alfred's Psalms (Psalm 7:16)
In the sense "So as to be the responsibility of a person; weighing on a person", the earliest attestation the OED has is from a1425:
The blood of hym schal be on his heed [a1382 E.V. into his hed, L. in caput eius], that goith out at the dore of thin hows.
John Wycliffe Bible