Authorities arrested 29-year-old Santiago Ayala-Lopez last night.
They say he confessed to starting the fire with a lighter after fighting with his girlfriend.
The blaze broke out at a single story apartment complex on N Street near Sixth yesterday afternoon.
The Merced City Fire chief says flames consumed one unit and two others were also on fire. No one was injured, but the damage is extensive.
"It's hard to say if its a total loss, but there's some pretty significant damage. It was heavily involved upon our arrival, I wouldn't be surprised if it is a total loss," Merced City Fire Chief Michael McLaughlin said.
The Red Cross is now helping the five families.