The Mercenary Magic Contract upgrade is part of the tier 1 Mercenary First Contract upgrade, which is only available when allied with the Mercenary faction.
It allows you to choose the first faction spell. A second spell will be available after buying the Tier 3 Mercenary Sorcery Contract.
You get to choose any spell regardless of the alignment you are playing. (e.g. The Night Time spell is available to the good alignment.)