The fire started just before 11:30 p.m. Monday on Indiana Avenue, just north of Foothill Boulevard, according to the Riverside Fire Department.
Officials say the fire burned the outside of the apartment buildings as well as some nearby palm trees, but the overall damage was minimal.
Crews managed to quickly extinguish the flames. A few lanes of the freeway were briefly shut down during the firefight.
No injuries were reported.