@stainx @Algoz and other peeps, Maomao -wanted- the guard to hit her, she was hoping the commotion would start a scene and stop the ceremony or at least delay it a little.
@MistLynx the guard is 'dead' because he -did- do his job but was 'wrong'. Jinshi and the old dude are going to be -super- pissed. Also while it was unofficial, Maomao was technically requested to investigate these cases as well, so she was doing her job too. It would be very very easy for either of the guys to say the guard interfered with the investigation, and nearly cost Jinshi his life, and assaulted Jinshi's maid. Both of which are heavily punishable things, because of Jinshi's rank.
Pretty much the guard is likely dead because he couldn't read the situation and adapt. He didn't have to let her in, but he actually should've tried to call for a stop to the ceremony until things could be sorted out, since she said a life was in danger. After all he could ID her as a maid, so there's the possibility someone sent her ahead to try and stop things while they tried to catch up since they might be older and slower.
Edit: Also remember this is "Imperial not exactly China" where peopel are punished -very- easily. It's the reason why MaoMao doesn't tell people her 'hunches' and only tells people things that can be proven without a doubt. Cause they will severely punish someone just on suspicion.