The Autovia Nacional 340 passes through Nerja and is the best way to get here by car. You will need to take exit 292 to get here, regardless if you're coming from Motril or from Malaga.
Nerja is at some 50 km from Malaga, and at 40 from Motril, which means that the communication between these two cities by car is pretty easy.