Maxwell's equations cannot describe a homogeneous and isotropic universe with a uniformly distributed net charge, because the electromagnetic field tensor in such a universe must be vanishing everywhere. For a closed universe with a nonzero net charge, Maxwell's equations always fail regardless of the spacetime symmetry and the charge distribution. The two paradoxes indicate that Maxwell's equations need be modified to be applicable to the universe as a whole. We consider two types of modified Maxwell equations, both can address the paradoxes. One is the Proca-type equation which contains a photon mass term. This type of electromagnetic field equations can naturally arise from spontaneous symmetry breaking and the Higgs mechanism in quantum field theory, where photons acquire a mass by eating massless Goldstone bosons. However, photons loose their mass when symmetry is restored, and the paradoxes reappear. The other type of modified Maxwell equations, which are more attractive in our opinions, contain a term with the electromagnetic potential vector coupled to the spacetime curvature tensor. This type of electromagnetic field equations do not introduce a new dimensional parameter and return to Maxwell's equations in a flat or Ricci-flat spacetime. We show that the curvature-coupled term can naturally arise from the ambiguity in extending Maxwell's equations from a flat spacetime to a curved spacetime through the minimal substitution rule. Some consequences of the modified Maxwell equations are investigated. The results show that for reasonable parameters the modification does not affect existing experiments and observations. However, the field equations with a curvature-coupled term can be testable in astrophysical environments where mass density is high or the gravity of electromagnetic radiation plays a dominant role in dynamics, e.g., interior of neutron stars and the early universe.