Both examples are correct in the sense that neither contains a grammatical error, but the first sentence reads more naturally even though it is in passive voice. A common misconception is that the passive voice is wrong or a grammatical error, but this is not the case. Passive voice is a perfectly valid grammatical form, it is simply a combination of a past participle verb and a helping "to be" verb.
The second example technically uses active voice, but it is no more specific than the passive version. This is because just like the passive voice version it avoids making anyone responsible for the action. Neither sentence assigns the enforcement of martial law to a particular actor, both use the "will be" verb to avoid it, even though one is active and one is passive.
Since both sentences contain the same amount of information and neither is grammatically incorrect, the choice between them is mainly an aesthetics issue. In this case, I favor the passive voice construction because it uses a more specific verb ("will be enforced") rather than the active voice version's more generic verb ("will be").
If your goal is to avoid assigning responsibility for the action, the passive voice will accomplish that very neatly. However if you don't mind assigning responibility (e.g. "The government will enforce martial law") then the active voice is the superior choice.