It's possible, but it won't be quick.
You're not allowed to take a hire car on the ferry services, so you'd have to take your own car. You've not stated where you're starting from but, as an example ViaMichelin (which is the best European route planning service) gives the driving time from London to Barcelona as around 15 hours.
http://www.viamichelin.com
However, that doesn't allow time for queuing for the cross-channel ferry, hold-ups or breaks. You should really allow at least 2 days for the journey, because it involves around 900 miles driving. That means taking an overnight break in central France.
Once you've got to Barcelona, you've then got a ferry crossing of around 8 hours:
http://www.indigoguide.com/majorca/ferries.htm
So, for example, if you left on a Monday morning, you'd drive all day before stopping overnight in the middle of France. Then you'd drive all day to get to Barcelona. Then you'd either have to take an overnight ferry (if one exists - see the above link for details of operators) or stay in Barcelona overnight and take the ferry in the morning. So you'd either arrive on Wednesday morning or Wednesday evening.
Taking the train to Barcelona might be a lot less stressful. See here:
http://www.theanswerbank.co.uk/Travel/Question 354959.html
Chris