Former president François Hollande and Paris Mayor Anne Hidalgo attended the wedding of the late Xavier Jugelé and Etienne Cardiles on Tuesday.
The couple were already civil partners.
Posthumous marriage must be personally authorised by the French president and is allowed if there are "serious reasons" to allow it and the circumstances of Jugelé's death were considered to fall into that category.
The attacker, who was later named as convicted criminal Karim Cheurfi, was shot dead by security forces.
Jugelé had campaigned for gay rights within the police force.
He was the fifth police officer slain in attacks that have claimed more than 230 lives across France since January 2015.