I used ViaMichelin.com to check several routings from Madrid to Porto by way of Granada, Seville and Malaga. By far the shortest/fastest by car is Madrid-Granada-Malaga-Seville-Porto. VM estimates the driving time at 15 hr. 50 min., whereas the other options I tested (including the two in your original query) were estimated to take over 19 hours. Making Malaga the last stop before Portugal isn't optional because it means having extra miles on the leg to Portugal, compared to the distance from Seville.
As you may already be aware, picking up a car in Spain and dropping it off in Portugal will almost certainly entail an extremely costly international-drop surcharge, so I'm hoping you are planning to travel by train and bus (no trains link Seville directly to Portugal).
A quick-and-dirty look at the rail schedules suggests it may not make much difference whether you travel Madrid-Malaga-Granada-Seville or Madrid-Granada-Malaga-Seville. I'd try hard to make Seville the last Spanish stop, because even without a car it will make the onward bus/train trip to Porto a bit less onerous. However, if you plan to fly to Porto--RyanAir seems to have flights to Porto from Malaga and Seville--it may not matter. Looking at the schedules, as suggested above, is smart, because in some cases there aren't a lot of departures.
I agree that 3 nights is short for Seville. Although I liked Malaga, I'd move a night from there to Seville. I haven't been to Portugal frequently enough to compare the time a traveler might need in Porto vs. Seville, but Seville is 2-1/2 times the size of Porto.