Hola!
I am pretty sure there is some route inland over the mountains to go from Malaga to Cadiz, but it will be hard route, uphill and downhill all the time, over Grazalema or Ronda, or further inland over Antequera and then enter the flat valley of Guadalquivir
Along the coast, there is lots of traffic, from málaga to gibraltar you have the toll motorway (not for bicycles!) and the dual carriage road which is extremely busy, has virtually no hard shoulders and has lots of dangerous entries and exits. There may be some other route, but I do not know of it.
Once in Gibraltar, you cross Algeciras and you come to the Atlantic, the stretch between Algeciras and Tarifa is extremely windy, uphill and very busy too. From Tarifa onwards, things should be a lot easier.
Buen camino!