We have done that a couple of times for a Celebrity cruise out of either Ft Lauderdale or Miami. We flew to/from Ft Lauderdale once - the airport is a zoo on a cruise turnaround day. All those different cruise lines passengers leaving and new ones arriving both at Ft Lauderdale & Miami and both airports are used for both cruise terminals. . A lot of seasoned cruisers will rent a car and fly from a different airport just to avoid the crowds.
However you might be cutting it very close depending on when you get off the ship, if you need to get your luggage, and get thru customs.. Once for Dec cruise it, it took us quite a bit of time just to make it out of the Miami/Ft Lauderdale area as the highways were blocked for a toys for tots motorcycle run.