  We investigate anisotropic cosmological solutions of the theory with
non-minimal couplings between electromagnetic fields and gravity in $Y(R) F^2$
form. After we derive the field equations by the variational principle, we look
for spatially flat cosmological solutions with magnetic fields or electric
fields. Then we give exact anisotropic solutions by assuming the hyperbolic
expansion functions. We observe that the solutions approach to the isotropic
case in late-times.
