In The Man in the Iron Mask, loyalties are continually being pitted against each other. Characters in the novel are always expected to first and foremost be loyal to the King, but this requirement sometimes conflicts with loyalties to friends, family, or self-interest.
Out of all the courtiers, D'Artagnan has the greatest loyalty to the King.