To add an ORDER BY clause to a query using CodeIgniter's Active Record class, you can use the order_by() method.