I've tried to understand it using context clues from the following but I really can't make sense if it. Is it literal?
Chinese Language Stack Exchange is a question and answer site for students, teachers, and linguists wanting to discuss the finer points of the Chinese language. It only takes a minute to sign up.Sign up to join this community
I feel this phrase is a metaphor for
戴绿帽子(wear green hats), which means a man has become a cuckold because his wife cheats on him and sleeps with other men. (This is also why Chinese men usually don't wear green hats and would get impressed when they first see people celebrating the St. Patrick's Day.)
(She made her husband wear green hats.)
She has cuckolded her husband.
(He wears green hats.)
His wife has cheated on him.
戴绿帽子 is a euphemism for
当王八(being a tortoise), because the head of a tortoise is dark green, and wearing green hats makes a man look like a tortoise.
当王八 is a cursing and scoffing way of expressing that someone has become a cuckold:
(She made her husband a tortoise.)
She cheated on her husband.
Many other expressions can be used as indirect ways to say
被绿了(be greened) and
戴绿帽子。In you question, because
养马(keep horses) needs grass,
在头上养马(keep horses on his head) implies that one's head is full of
green grass, the same looking as in wearing a green hat. For each of your sentences:
Let him become a cuckold.
I'll cheat on him. (if spoken by his wife)
How dare he to cheat on her?
Although the phrases are only used on men (saying a women becomes a tortoise or wears green hats really doesn't make sense, because
当王八 is only for men.), nowadays people generalize some derivative terms such as
被绿了 also for women.
Those who accept 莫可可 as girl friend/wife would have to prepare to be a cuckold.
You wanna cheat on me?