A Hong Kong police spokeswoman said two brothers surnamed Mak who own a shop near the film set approached Bay and demanded 100,000 Hong Kong dollars ($13,000).
When Bay refused to pay, they assaulted him, she said. The brothers also allegedly assaulted three police officers who were called to the set.
The spokeswoman said Bay suffered a minor injury to his face but declined medical treatment. She spoke on customary condition of anonymity.
The two men, aged 27 and 28, were arrested and face charges of blackmail, assault and assaulting police officers, she said.
Paramount Pictures gave a somewhat different account of the incident, which it said occurred on the film's first day of production in Hong Kong.
It said in a statement that a man allegedly under the influence of a narcotic substance rushed onto the set wielding an air conditioning unit and swung it at Bay's head. It said Bay ducked and wrestled the air conditioning unit away from the man.
Police arrested the man and two companions, and no one on the set was injured, Paramount said.
"Transformers 4: Age of Extinction" is partly set in Hong Kong. It stars Mark Wahlberg and is to be released next June.