Exhibit 23.1
Consent of Independent Registered Public Accounting Firm
We consent to the incorporation by reference in the following Registration Statements:
of our reports dated February 22, 2024, with respect to the financial statements and schedule of Old Dominion Freight Line, Inc. and the effectiveness of internal control over financial reporting of Old Dominion Freight Line, Inc. included in this Annual Report (Form 10-K) of Old Dominion Freight Line, Inc. for the year ended December 31, 2023.
/s/ Ernst & Young LLP
Raleigh, North Carolina
February 26, 2024