Traveling from Malaga Spain to Lisbon Portugal

I am flying into Madrid in less than two weeks and was planning on spending a few days in Malaga and then going to Lisbon.  However, all the travel options either seem to take a long time (overnight bus) or be expensive (one-way flight).  Does anyone have any suggestions of alternative modes of transportation?  Is it possible to rent a car in Spain and return it in Portugal?

Thank you so much!

i think bus is better for anyone.becouse texi or privat car is expensive.