MPB 2025 Special Meeting Proxy Statement

PROSPECTUS Joint Proxy Statement/Prospectus MERGER PROPOSED—YOUR VOTE IS VERY IMPORTANT Dear Shareholder: On October 31, 2024, Mid Penn Bancorp, Inc., or Mid Penn, and William Penn Bancorporation, or William Penn, entered into a merger agreement, under which William Penn will merge with and into Mid Penn, with Mid Penn remaining as the surviving entity. Mid Penn and William Penn are each holding a special meeting for their respective shareholders to vote on the proposals necessary to complete the merger. Mid Penn shareholders will vote to approve the issuance of shares of Mid Penn common stock in connection with the merger and on other matters described below at the special meeting of shareholders to be held virtually at 9:00 AM, Eastern Time, on April 2, 2025. William Penn shareholders will vote to adopt the merger agreement and on the other matters described below at a special meeting of shareholders to be held at William Penn’s corporate office located at 10 Canal Street, Suite 104, Bristol, Pennsylvania 19007 at 9:00 AM, Eastern Time, on April 2, 2025. Information regarding how Mid Penn shareholders and William Penn shareholders can attend and participate in their respective special meetings of shareholders is included in the proxy card for the respective companies included with this joint proxy statement/prospectus. If the merger is completed, William Penn shareholders will have the right to receive for each share of William Penn common stock they own 0.426 shares of Mid Penn common stock. Cash will be paid in lieu of any fractional shares. The maximum number of shares of Mid Penn common stock estimated to be issuable upon completion of the merger is 3,922,700. Following the completion of the merger, former William Penn shareholders will hold approximately 16.85% of Mid Penn’s common stock. The common stock of Mid Penn trades on the Nasdaq Global Market under the symbol “MPB” and the common stock of William Penn trades on the Nasdaq Capital Market under the symbol “WMPN.” On October 31, 2024, which was the last trading date preceding the public announcement of the proposed merger, the closing price of Mid Penn common stock and William Penn common stock was $31.59 per share and $12.74 per share, respectively. On February 6, 2025, the most recent practicable trading day prior to the printing of this joint proxy statement/prospectus, the closing price of Mid Penn common stock and William Penn common stock was $30.28 per share and $12.58 per share, respectively. The market price of both Mid Penn common stock and William Penn common stock will fluctuate before the completion of the merger; therefore, you are urged to obtain current market quotations for Mid Penn common stock and William Penn common stock. Additionally, as described in more detail elsewhere in this joint proxy statement/prospectus, under the terms of the merger agreement, if the average price of Mid Penn common stock over a specified period of time decreases below certain specified thresholds, William Penn would have a right to terminate the merger agreement, unless Mid Penn elects to increase the exchange ratio, which would result in additional shares of Mid Penn common stock being issued. The Mid Penn board of directors has determined that the merger is advisable and in the best interests of Mid Penn and its shareholders, and the Mid Penn board of directors unanimously recommends that the Mid Penn shareholders vote “FOR” the approval of the issuance by Mid Penn of shares of Mid Penn common stock to be issued to holders of William Penn common stock as merger consideration in connection with the merger. The William Penn board of directors has determined that the merger is advisable and in the best interests of William Penn and its shareholders, and the William Penn board of directors unanimously recommends that the William Penn shareholders vote “FOR” the approval and adoption of the merger agreement. Your vote is very important. Whether or not you plan to attend your shareholders’ meeting, please take the time to vote by completing and mailing the enclosed proxy card in accordance with the instructions on the proxy card. Mid Penn and William Penn shareholders may also cast their votes over the Internet or by telephone in accordance with the instructions on the Mid Penn or William Penn proxy card or voting instructions, as the case may be. We cannot complete the merger unless, among other matters, (i) William Penn shareholders approve and adopt the merger agreement and (ii) Mid Penn shareholders approve the issuance of shares of Mid Penn common stock in connection with the merger. You should read this entire joint proxy statement/prospectus, including the annexes hereto and the documents incorporated by reference herein, carefully because it contains important information about the merger and the related transactions. In particular, you should read carefully the information under the section entitled “Risk Factors” beginning on page 39. You can also obtain information about Mid Penn and William Penn from documents that each has filed with the Securities and Exchange Commission. We strongly support this combination of our companies and join with the other members of our boards of directors in enthusiastically recommending that you vote in favor of the merger. Rory G. Ritrievi Kenneth J. Stephon President and Chief Executive Officer Chairman, President and Chief Executive Officer Mid Penn Bancorp, Inc. William Penn Bancorporation The shares of Mid Penn common stock to be issued to William Penn shareholders in the merger are not deposits or savings accounts or other obligations of any bank or savings association, and are not insured by the Federal Deposit Insurance Corporation or any other governmental agency. Neither the Securities and Exchange Commission nor any state securities commission has approved or disapproved the Mid Penn common stock to be issued in the merger, or passed upon the adequacy or accuracy of this joint proxy statement/prospectus. Any representation to the contrary is a criminal offense. The date of this joint proxy statement/prospectus is February 7, 2025, and it is first being mailed or otherwise delivered to Mid Penn shareholders and William Penn shareholders on or about February 14, 2025. This document incorporates important business and financial information about Mid Penn and William Penn that is not included in or delivered with this document. This information is available without charge to shareholders upon written or oral request at either Mid Penn’s or William Penn’s address and telephone number listed on page i. To obtain timely delivery, Mid Penn shareholders must request the information no later than March 26, 2025 and William Penn shareholders must request this information no later than March 26, 2025. Please see “Where You Can Find More Information” on page 129 for instructions to request this and certain other information regarding Mid Penn and William Penn.

MID PENN BANCORP, INC. 2407 PARK DRIVE HARRISBURG, PENNSYLVANIA 17110 NOTICE OF SPECIAL MEETING OF SHAREHOLDERS TO BE HELD ON APRIL 2, 2025 TO THE SHAREHOLDERS OF MID PENN BANCORP, INC.: NOTICE IS HEREBY GIVEN that a special meeting of shareholders of Mid Penn Bancorp, Inc., or Mid Penn, will be held virtually at 9:00 AM, Eastern Time, on April 2, 2025, to consider and vote on: 1. a proposal to approve the issuance by Mid Penn of shares of Mid Penn common stock to holders of common stock of William Penn Bancorporation, or William Penn, as contemplated by the Agreement and Plan of Merger, dated October 31, 2024, by and between Mid Penn and William Penn (the “Mid Penn share issuance proposal”); and 2. a proposal to authorize the board of directors to adjourn the special meeting, if necessary, to solicit additional proxies, in the event there are not sufficient votes at the time of the special meeting to approve the Mid Penn share issuance proposal (the “Mid Penn adjournment proposal”). These items are described in more detail in the accompanying joint proxy statement/prospectus and its annexes. You should read these documents in their entirety before voting. We have fixed January 31, 2025 as the record date for determining those Mid Penn shareholders entitled to vote at the special meeting. Accordingly, only shareholders of record at the close of business on that date are entitled to notice of and to vote at the special meeting or any adjournment or postponement of the meeting. Your board of directors has unanimously determined that the proposed merger is advisable and in the best interests of Mid Penn and its shareholders and unanimously recommends that you vote “FOR” the Mid Penn share issuance proposal and “FOR” the Mid Penn adjournment proposal. In accordance with the terms of the merger agreement, each director and executive officer of Mid Penn has agreed to vote all shares of Mid Penn common stock owned by him or her, and that he or she has the sole power to vote or direct the voting thereof, in favor of the Mid Penn share issuance proposal. Your vote is very important, regardless of the number of shares of Mid Penn common stock that you own. We cannot complete the merger unless the issuance of shares of Mid Penn common stock in connection with the merger is approved by a majority of the votes cast at the Mid Penn special meeting. Even if you plan to attend the special meeting (information regarding how you can attend and participate in the special meeting is included in the proxy card), Mid Penn requests that you complete, sign, date and return, as promptly as possible, the enclosed proxy card in the accompanying prepaid reply envelope or submit your proxy by telephone or Internet prior to the special meeting to ensure that your shares of Mid Penn common stock will be represented at the special meeting. If you hold your shares in “street name” through a bank, brokerage firm or other nominee, you should follow the procedures provided by your bank, brokerage firm or other nominee to vote your shares. If you fail to submit a proxy or to virtually attend the special meeting and vote or do not provide your bank, brokerage firm or other nominee with instructions as to how to vote your shares, as applicable, your shares of Mid Penn common stock will not be counted. We urge you to vote as soon as possible so that your shares will be represented.

BY ORDER OF THE BOARD OF DIRECTORS, Elizabeth O. Martin Corporate Secretary Harrisburg, Pennsylvania February 7, 2025

WILLIAM PENN BANCORPORATION 10 CANAL STREET, SUITE 104 BRISTOL, PENNSYLVANIA 19007 NOTICE OF SPECIAL MEETING OF SHAREHOLDERS TO BE HELD ON APRIL 2, 2025 TO THE SHAREHOLDERS OF WILLIAM PENN BANCORPORATION NOTICE IS HEREBY GIVEN that a special meeting of shareholders of William Penn Bancorporation, or William Penn, will be held at William Penn’s corporate office located at 10 Canal Street, Suite 104, Bristol, Pennsylvania 19007 at 9:00 AM, Eastern Time, on April 2, 2025, to consider and vote on: 1. a proposal to approve and adopt the Agreement and Plan of Merger, dated October 31, 2024, by and between Mid Penn Bancorp, Inc., or Mid Penn, and William Penn, which provides for, among other things, the merger of William Penn with and into Mid Penn (the “William Penn merger proposal”); and 2. a proposal to authorize the board of directors to adjourn the William Penn special meeting, if necessary, to solicit additional proxies, in the event there are not sufficient votes at the time of the William Penn special meeting to approve the William Penn merger proposal (the “William Penn adjournment proposal”). We have fixed January 31, 2025 as the record date for determining those William Penn shareholders entitled to vote at the special meeting. Accordingly, only shareholders of record at the close of business on that date are entitled to notice of and to vote at the special meeting or any adjournment or postponement of the meeting. Your board of directors has unanimously determined that the proposed merger is advisable and in the best interests of William Penn and its shareholders and unanimously recommends that you vote “FOR” the William Penn merger proposal and “FOR” the William Penn adjournment proposal. In accordance with the terms of the merger agreement, each director and executive officer of William Penn has agreed to vote all shares of William Penn common stock owned by him or her, and that he or she has the sole power to vote or direct the voting thereof, in favor of approval and adoption of the merger agreement and the transactions contemplated thereby. We urge you to vote as soon as possible so that your shares will be represented. Your vote is very important, regardless of the number of shares of William Penn common stock that you own. We cannot complete the merger unless the affirmative vote of at least a majority of the votes entitled to vote on such proposal at the William Penn special meeting is voted to approve and adopt the William Penn merger proposal. Even if you plan to attend the special meeting (information regarding how you can attend and participate in the special meeting is included in the proxy card), William Penn requests that you complete, sign, date and return, as promptly as possible, the enclosed proxy card in the accompanying prepaid reply envelope or submit your proxy by telephone or the Internet prior to the special meeting to ensure that your shares of William Penn common stock will be represented at the special meeting. If you hold your shares in “street name” through a bank, brokerage firm or other nominee, you should follow the procedures provided by your bank, brokerage firm or other nominee to vote your shares. If you fail to submit a proxy or attend the special meeting and vote or do not provide your bank, brokerage firm or other nominee with instructions as to how to vote your shares, your shares of William Penn common stock will not be counted and will have the same effect as a vote “AGAINST” the approval and adoption of the merger agreement.

BY ORDER OF THE BOARD OF DIRECTORS, Jonathan T. Logan Corporate Secretary Bristol, Pennsylvania February 7, 2025 WILLIAM PENN SHAREHOLDERS SHOULD NOT SEND STOCK CERTIFICATES AT THIS TIME. YOU WILL BE SENT SEPARATE INSTRUCTIONS ABOUT HOW TO RECEIVE THE MERGER CONSIDERATION AND THE SURRENDER OF YOUR STOCK CERTIFICATES.

HOW TO OBTAIN ADDITIONAL INFORMATION This joint proxy statement/prospectus incorporates by reference important business and financial information about Mid Penn and William Penn that is not included in or delivered with this document. You can obtain free copies of this information through the SEC website at https://www.sec.gov. You will also be able to obtain these documents, free of charge, from Mid Penn at www.midpennbank.com, under the heading “SEC Filings” or from William Penn by accessing William Penn’s website at www.williampenn.bank, under the heading “Investor Relations.” You can also obtain free copies of this information by writing or calling: Mid Penn Bancorp, Inc. 2407 Park Drive Harrisburg, Pennsylvania 17110 Attention: Investor Relations (866) 642-7736 William Penn Bancorporation 10 Canal Street, Suite 104 Bristol, Pennsylvania 19007 Attention: Jonathan T. Logan (267) 540-8500 You will not be charged for any of these documents that you request. In order to obtain timely delivery of the documents, you must request the information no later than five business days before the date of the applicable special meeting. Therefore, you must request the information no later than March 26, 2025, with respect to Mid Penn information, and no later than March 26, 2025 with respect to William Penn information. If you are a shareholder of William Penn and have questions about the merger or the special meeting of William Penn, would like additional copies of this document or proxy cards, or need any other information related to the proxy solicitations, you may also contact Alliance Advisors at (833) 215-7310. For a more detailed description of the information incorporated by reference in this joint proxy statement/ prospectus and how you may obtain it, see the section entitled “Where You Can Find More Information” on page 129 and “Incorporation of Certain Documents by Reference” on page 130. All information concerning Mid Penn and its subsidiaries has been furnished by Mid Penn, and all information concerning William Penn and its subsidiaries has been furnished by William Penn. You should rely only on the information contained or incorporated by reference in this joint proxy statement/prospectus when evaluating the merger agreement and the proposed merger. We have not authorized anyone to provide you with information that is different from what is contained in this joint proxy statement/prospectus. This joint proxy statement/prospectus is dated February 7, 2025. You should not assume that the information contained in this joint proxy statement/prospectus is accurate as of any date other than such date. Further, you should not assume that the information incorporated by reference into this joint proxy statement/prospectus is accurate as of any date other than the date of the incorporated document. Neither the mailing of this joint proxy statement/prospectus nor the issuance of shares of Mid Penn common stock as contemplated by the merger agreement shall create any implication to the contrary. This joint proxy statement/prospectus does not constitute an offer to sell, or a solicitation of an offer to buy, any securities or the solicitation of a proxy, in any jurisdiction in which or from any person to whom it is not lawful to make any such offer or solicitation in such jurisdiction. i

ABOUT THIS JOINT PROXY STATEMENT/PROSPECTUS This document, which forms part of a registration statement on Form S-4 filed with the SEC by Mid Penn (File No. 333-284342), constitutes a prospectus of Mid Penn under the Securities Act of 1933, as amended, which we refer to as the “Securities Act,” with respect to the shares of common stock, par value $1.00 per share, of Mid Penn, which we refer to as “Mid Penn common stock,” to be issued pursuant to the Agreement and Plan of Merger, dated as of October 31, 2024, by and between Mid Penn and William Penn, which we refer to as the “merger agreement.” This document also constitutes a proxy statement of Mid Penn and William Penn under the Securities Exchange Act of 1934, which we refer to as the “Exchange Act.” It also constitutes a notice of meeting with respect to the special meetings, at which each of Mid Penn and William Penn shareholders will be asked to vote on proposals necessary to complete the merger. Mid Penn has supplied all information contained or incorporated by reference into this joint proxy statement/prospectus relating to Mid Penn, and William Penn has supplied all information contained or incorporated by reference into this joint proxy statement/prospectus relating to William Penn. ii

TABLE OF CONTENTS QUESTIONS AND ANSWERS ABOUT THE MERGER AND THE SPECIAL MEETINGS . . . . . . . . . . . 1 Questions about the Merger ............................................................. 1 Questions about the Mid Penn Special Meeting .............................................. 4 Questions about the William Penn Special Meeting ........................................... 8 SUMMARY ........................................................................... 13 UNAUDITED PRO FORMA COMBINED CONSOLIDATED FINANCIAL INFORMATION . . . . . . . . . 22 RISKFACTORS........................................................................ 39 CAUTIONARY STATEMENT REGARDING FORWARD-LOOKING STATEMENTS . . . . . . . . . . . . . . 47 THEMERGER ......................................................................... 49 Background of the Merger .............................................................. 49 William Penn’s Reasons for the Merger .................................................... 53 Recommendation of William Penn’s Board of Directors ....................................... 57 Opinion of William Penn’s Financial Advisor ............................................... 57 Mid Penn’s Reasons for the Merger ....................................................... 70 Recommendation of Mid Penn’s Board of Directors .......................................... 72 Opinion of Keefe, Bruyette & Woods, Inc. to Mid Penn’s Board of Directors ...................... 72 Certain Prospective Financial Information of the Parties ...................................... 84 Board of Directors and Management of Mid Penn Following Completion of the Merger .............. 87 Regulatory Approvals Required for the Merger .............................................. 88 INTERESTS OF WILLIAM PENN’S DIRECTORS AND EXECUTIVE OFFICERS IN THE MERGER ........................................................................... 89 Treatment of Stock Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 Treatment of Restricted Stock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 Change in Control Agreements with Alan B. Turner, Jeannine Cimino, Amy J. Logan (Hannigan) and JonathanT.Logan ................................................................... 89 Employment Agreement with Kenneth J. Stephon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 Indemnification ....................................................................... 91 Directors’ and Officers’ Insurance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 THEMERGERAGREEMENT ............................................................ 92 Terms of the Merger ................................................................... 92 Closing and Effective Time of the Merger .................................................. 92 Consideration to Be Received in the Merger ................................................ 92 Conversion of Shares; Letter of Transmittal; Exchange of Certificates ............................ 93 Dividends and Distributions ............................................................. 94 Representations and Warranties .......................................................... 94 Covenants and Agreements .............................................................. 96 William Penn Bank Post-Closing Operation ................................................ 100 Shareholder Meetings .................................................................. 100 Agreement Not to Solicit Other Offers ..................................................... 100 Expenses and Fees .................................................................... 102 Indemnification and Insurance ........................................................... 103 Conditions to Complete the Merger ....................................................... 103 Termination of the Merger Agreement ..................................................... 104 Termination Fee ...................................................................... 105 Amendment, Waiver and Extension of the Merger Agreement ................................... 105 ACCOUNTINGTREATMENT ............................................................ 107 MATERIAL UNITED STATES FEDERAL INCOME TAX CONSEQUENCES OF THE MERGER . . . . . 108 THEMIDPENNSPECIALMEETING...................................................... 111 MIDPENNSPECIALMEETING—PROPOSALNO.1 ........................................ 113 MID PENN SHARE ISSUANCE PROPOSAL PURSUANT TO THE MERGER AGREEMENT . . . . . . . . 113 iii

MIDPENNSPECIALMEETING—PROPOSALNO.2 ........................................ 113 MIDPENNADJOURNMENTPROPOSAL .................................................. 113 INFORMATIONABOUTMIDPENNBANCORP,INC. ....................................... 114 Business ............................................................................. 114 THEWILLIAMPENNSPECIALMEETING................................................. 115 WILLIAMPENNSPECIALMEETING—PROPOSALNO.1 ................................... 118 WILLIAMPENNMERGERPROPOSAL.................................................... 118 WILLIAMPENNSPECIALMEETING—PROPOSALNO.2 ................................... 118 WILLIAMPENNADJOURNMENTPROPOSAL ............................................. 118 INFORMATION ABOUT WILLIAM PENN BANCORPORATION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119 Business ............................................................................. 119 COMPARISONOFSHAREHOLDERS’RIGHTS ............................................. 120 COMMONSTOCKINFORMATION ....................................................... 125 LEGALMATTERS ..................................................................... 126 EXPERTS ............................................................................. 127 OTHERMATTERS ..................................................................... 128 WHEREYOUCANFINDMOREINFORMATION ........................................... 129 INCORPORATION OF CERTAIN DOCUMENTS BY REFERENCE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130 Annex A Agreement and Plan of Merger, dated October 31, 2024 A-1 Annex B Opinion of Piper Sandler & Co. B-1 Annex C Opinion of Keefe, Bruyette & Woods, Inc. C-1 iv

QUESTIONS AND ANSWERS ABOUT THE MERGER AND THE SPECIAL MEETINGS The following questions and answers briefly address some commonly asked questions about the merger (as defined below) and the shareholder meetings. They may not include all the information that is important to the shareholders of Mid Penn and William Penn. Shareholders of Mid Penn and William Penn should each read carefully this entire joint proxy statement/prospectus, including the annexes and other documents referred to in this joint proxy statement/prospectus. Questions about the Merger Q: What is the merger? A: Mid Penn and William Penn have entered into an Agreement and Plan of Merger, dated October 31, 2024, which is referred to as the “merger agreement.” A copy of the merger agreement is attached as Annex A to, and is incorporated by reference in, this joint proxy statement/prospectus. The merger agreement contains the terms and conditions of the proposed business combination of Mid Penn and William Penn. Under the merger agreement, William Penn will merge with and into Mid Penn, with Mid Penn remaining as the surviving entity, and the separate corporate existence of William Penn will cease. We refer to this transaction as the “merger.” Immediately following the merger, William Penn Bank, a wholly owned bank subsidiary of William Penn, will merge with and into Mid Penn’s wholly owned bank subsidiary, Mid Penn Bank, with Mid Penn Bank as the surviving bank, and the separate corporate existence of William Penn Bank will cease. We refer to this transaction as the “bank merger.” We refer to the merger and the bank merger collectively as the “mergers.” Q: Why am I receiving these materials? A: This document constitutes both a joint proxy statement of Mid Penn and William Penn and a prospectus of Mid Penn. It is a joint proxy statement because the boards of directors of both companies are soliciting proxies from their respective shareholders. It is a prospectus because Mid Penn will issue shares of its common stock in exchange for shares of William Penn common stock in the merger. Mid Penn is providing this joint proxy statement/prospectus to its shareholders because the Mid Penn Board of Directors is soliciting their proxy for use at the Mid Penn special meeting of shareholders at which the Mid Penn shareholders will consider and vote on (i) the approval of the issuance by Mid Penn of shares of Mid Penn common stock to holders of common stock of William Penn as merger consideration (the “Mid Penn share issuance proposal”), and (ii) the approval of the authorization of the Mid Penn board of directors to adjourn the Mid Penn special meeting, if necessary, to solicit additional proxies, in the event there are not sufficient votes at the time of the special meeting to approve the Mid Penn share issuance proposal (the “Mid Penn adjournment proposal”). See “The Mid Penn Special Meeting,” beginning on page 111 for more information. William Penn is providing this joint proxy statement/prospectus to its shareholders because the William Penn Board of Directors is soliciting their proxy for use at the William Penn special meeting of shareholders at which the William Penn shareholders will consider and vote on (i) the approval and adoption of the merger agreement which provides for, among other things, the merger of William Penn with and into Mid Penn (the “William Penn merger proposal”), and (ii) the approval of the authorization of the William Penn board of directors to adjourn the William Penn special meeting, if necessary, to solicit additional proxies, in the event there are not sufficient votes at the time of the special meeting to approve the William Penn merger proposal (the “William Penn adjournment proposal”). See “The William Penn Special Meeting,” beginning on page 115 for more information. Information about these meetings, the merger and the other business to be considered at the meetings is contained in this joint proxy statement/prospectus. The merger cannot be completed unless the shareholders 1

of Mid Penn approve the issuance by Mid Penn of shares of Mid Penn common stock to holders of common stock of William Penn as merger consideration, and the shareholders of William Penn approve and adopt the merger agreement. Q: Why is Mid Penn proposing the merger? A: The Mid Penn board of directors, in unanimously determining that the merger is in the best interests of Mid Penn and it shareholders, considered a number of key factors that are described under the heading “The Merger—Mid Penn’s Reasons for the Merger,” beginning on page 70. Q: Why is William Penn proposing the merger? A: The William Penn board of directors, in unanimously determining that the merger is in the best interests of William Penn and its shareholders, considered a number of key factors that are described under the heading “The Merger—William Penn’s Reasons for the Merger,” beginning on page 53. Q: What will William Penn shareholders receive in the merger, and how will this affect holders of Mid Penn common stock? A: Upon completion of the merger, William Penn shareholders will be entitled to receive, for each share of William Penn common stock they own, 0.426 shares, which we sometimes call the “exchange ratio,” of Mid Penn common stock. The exchange ratio is fixed and not subject to adjustment, except in limited circumstances. On October 31, 2024, which was the last trading date preceding the public announcement of the proposed merger, the closing price of Mid Penn common stock was $31.59 per share, which, after giving effect to the 0.426 exchange ratio, would result in merger consideration with an implied value of approximately $13.46 per share of William Penn common stock. On February 6, 2025, the most recent practicable trading day prior to the printing of this joint proxy statement/prospectus, the closing price of Mid Penn common stock was $30.28 per share, which, after giving effect to the 0.426 exchange ratio, would result in merger consideration with an implied value of approximately $12.90 per share of William Penn common stock. The market price of both Mid Penn common stock and William Penn common stock will fluctuate before the completion of the merger; therefore, you are urged to obtain current market quotations for Mid Penn common stock and William Penn common stock. Because of the number of shares of Mid Penn common stock being issued in the merger, the percentage ownership interest in Mid Penn represented by the existing shares of Mid Penn common stock will be diluted. Mid Penn shareholders will not receive any merger consideration and will continue to own their existing shares of Mid Penn common stock after the merger. Q: What equity stake will William Penn shareholders hold in Mid Penn immediately following the merger? A: Following completion of the merger, current Mid Penn shareholders will own in the aggregate approximately 83.15% of the outstanding shares of Mid Penn common stock and William Penn shareholders will own approximately 16.85% of the outstanding shares of Mid Penn common stock. Q: What happens if I am eligible to receive a fraction of a share of Mid Penn common stock as part of the merger consideration? A: If the aggregate number of shares of Mid Penn common stock that you are entitled to receive as part of the merger consideration includes a fraction of a share of Mid Penn common stock, you will receive cash in lieu of that fractional share. For each fractional share that would otherwise be issued, Mid Penn will pay cash in 2

an amount equal to the fraction multiplied by the closing price for a share of Mid Penn common stock as reported on Nasdaq for the fifth business day prior to the closing date. See the section entitled “The Merger Agreement—Consideration to be Received in the Merger” beginning on page 92 of this joint proxy statement/prospectus. Q: Who will be the directors and executive officers of the combined company following the merger? A: Following completion of the merger, the then current directors and executive officers of Mid Penn and Mid Penn Bank will continue in office. In addition, upon the effective time of the merger, Kenneth J. Stephon, the current Chairman, President and Chief Executive Officer of William Penn, will be appointed as (i) a director of Mid Penn and Mid Penn Bank, (ii) Vice Chair of Mid Penn Bank, and (iii) Chief Corporate Development Officer of Mid Penn and Mid Penn Bank. Q: When do you expect to complete the merger? A: Subject to the satisfaction or waiver of the closing conditions as contemplated by the merger agreement, including receipt of shareholder approvals at the respective special meetings of Mid Penn and William Penn and receipt of regulatory approvals, we currently expect to complete the merger in the second quarter of 2025. It is possible, however, that factors outside of either company’s control could result in us completing the merger at a later time or not completing it at all. Q: What happens if the merger is not completed? A: If the merger is not completed, William Penn shareholders will not receive any consideration for their shares of common stock in connection with the merger. Instead, William Penn will remain an independent company and its common stock will continue to be listed and traded on the Nasdaq Capital Market. Under specified circumstances, William Penn may be required to pay to Mid Penn a fee with respect to the termination of the merger agreement. For more information, please review the sections entitled “The Merger Agreement—Termination of the Merger Agreement” and “Termination Fee” on page 104 and 105, respectively. Q: How will the merger affect William Penn equity awards? A: William Penn equity awards will be affected as follows: Stock Options: At the effective time of the merger, each option to purchase shares of William Penn common stock which is outstanding and unexercised immediately prior to the effective time of the merger, whether or not then vested and exercisable, shall cease to represent a right to acquire shares of William Penn common stock and will be converted into an option to acquire, on the same terms and conditions as were applicable under such William Penn stock option (including vesting and exercisability terms) immediately prior to the effective time of the merger, the number of shares of Mid Penn common stock equal to (a) the number of shares of William Penn common stock subject to such stock option multiplied by (b) 0.426. Such product will be rounded down to the nearest whole share. The exercise price per share (rounded up to the nearest whole cent) of each Mid Penn stock option issued for the William Penn stock option will be equal to (y) the exercise price per share of shares of William Penn common stock that were purchasable pursuant to such William Penn stock option divided by (z) 0.426. If an officer, director, or employee of William Penn has received a stock option award and they are terminated within two years of the completion of the merger, any unvested stock option awards will automatically vest upon termination. Restricted Stock Awards: At the effective time of the merger, each restricted stock award of William Penn common stock which is outstanding immediately prior to the effective time of the merger and with respect to which the applicable restrictions have not yet lapsed, shall cease to represent a right to acquire shares of William Penn common stock and will be converted into the right to receive, on the same terms and conditions as were applicable under such William Penn restricted stock award (including vesting terms) 3

immediately prior to the effective time of the merger, the number of shares of Mid Penn common stock equal to (a) the number of shares of William Penn common stock subject to such restricted stock award multiplied by (b) 0.426. Such product will be rounded down to the nearest whole share. If an officer, director, or employee of William Penn has received a restricted stock award and they are terminated within two years of the completion of the merger, any unvested restricted stock awards will automatically vest upon termination. Q: What are the U.S. federal income tax consequences of the merger? A: The merger has been structured to qualify as a reorganization within the meaning of Section 368(a) of the Internal Revenue Code of 1986, as amended, which is referred to as the Internal Revenue Code. It is a condition to the completion of the merger that each of Mid Penn and William Penn receive a written opinion from their respective legal counsel to the effect that the merger will be treated as a reorganization within the meaning of Section 368(a) of the Internal Revenue Code. Because William Penn shareholders will receive solely Mid Penn common stock for their shares (except for cash in lieu of fractional shares), William Penn shareholders should not recognize gain or loss except with respect to the cash they receive in lieu of a fractional share. This tax treatment may not apply to all William Penn shareholders. Determining the actual tax consequences of the merger to William Penn shareholders can be complicated. William Penn shareholders should consult their own tax advisor for a full understanding of the merger’s tax consequences that are particular to each shareholder. For further discussion of the material U.S. federal income tax consequences of the merger, see “Material United States Federal Income Tax Consequences of the Merger,” beginning on page 108. Questions about the Mid Penn Special Meeting Q: What am I being asked to vote on at the Mid Penn special meeting? A: Mid Penn shareholders of record are being asked to consider and vote on: 1. the Mid Penn share issuance proposal; and 2. the Mid Penn adjournment proposal. Q: How does the Mid Penn board of directors recommend that I vote my shares? A: The Mid Penn board of directors recommends that the Mid Penn shareholders vote their shares as follows: • “FOR” the Mid Penn share issuance proposal; and • “FOR” the Mid Penn adjournment proposal. As of the record date, directors and executive officers of Mid Penn and their affiliates had the right to vote 1,532,691 shares of Mid Penn common stock, or 7.9% of the outstanding Mid Penn common stock entitled to be voted at the special meeting. Each of the directors and executive officers of Mid Penn has entered into a separate voting agreement with William Penn and has agreed to vote all shares of Mid Penn common stock owned by him or her that he or she has the sole power to vote or direct the voting thereof in favor of adoption of the share issuance proposal. Q: What do I need to do now? A: After carefully reading and considering the information contained in this joint proxy statement/prospectus, please submit your proxy as soon as possible so that your shares will be represented at the Mid Penn special meeting. Please follow the instructions set forth on the proxy card or on the voting instruction form provided by the record holder if your shares are held in the name of your broker or other nominee. 4

Q: Who is entitled to vote at the Mid Penn special meeting? A: Mid Penn shareholders of record as of the close of business on January 31, 2025, which is referred to as the “Mid Penn record date,” are entitled to notice of, and to vote at, the Mid Penn special meeting. Q: How many votes do I have? A: Each outstanding share of Mid Penn common stock is entitled to one vote. Q: How do I vote my Mid Penn shares? A: Mid Penn shareholders of record may vote their Mid Penn shares by completing and returning the enclosed proxy card, by Internet, by telephone or by voting virtually at the Mid Penn special meeting. Voting by Proxy. Mid Penn shareholders of record may vote their Mid Penn shares by completing and returning the enclosed proxy card. Your proxy will be voted in accordance with your instructions. If you submit a properly executed and dated proxy, but do not specify a choice on one of the proposals described in this joint proxy statement/prospectus, your proxy will be voted in favor of that proposal. Voting by Internet. If you are a registered shareholder, you may vote electronically through the Internet by following the instructions included on your proxy card. If your shares are registered in the name of a broker or other nominee, you may be able to vote via the Internet. If so, the voting form your nominee sends you will provide Internet instructions. Voting by Phone. Use any touch-tone telephone to transmit your voting instructions up until 11:59 p.m. Eastern Time the day before the cut-off date or meeting date. Have your proxy card in hand when you call 1-866-883-0222 and then follow the instructions. Voting Virtually at the Special Meeting. Mid Penn shareholders of record may virtually attend the Mid Penn special meeting and vote. Information regarding how to virtually attend the special meeting is included in the proxy card. If your shares are registered in the name of a broker or other nominee and you wish to vote at the meeting you will need to obtain a legal proxy from your bank or brokerage firm. Please consult the voting form sent to you by your bank or broker to determine how to obtain a legal proxy in order to vote at the special meeting. Q: Why is my vote important? A: Because the issuance by Mid Penn of shares of Mid Penn common stock to holders of common stock of William Penn to complete the merger must be approved by the affirmative vote of a majority of the votes cast, in person or by proxy, at the Mid Penn special meeting, every shareholder’s vote is important. Q: If my shares of Mid Penn common stock are held in street name by my broker, will my broker automatically vote my shares for me? A: No. Your broker CANNOT vote your shares on any proposal at the Mid Penn special meeting without instructions from you. You should instruct your broker as to how to vote your shares, following the directions your broker provides to you. Q: What if I fail to instruct my broker? A: If you do not provide your broker with instructions, your broker generally will not be permitted to vote your shares on the share issuance proposal or any other proposal (a so-called “broker non-vote”) at the Mid Penn special meeting. For purposes of determining the number of votes cast with respect to the Mid Penn share 5

issuance proposal, only those votes cast “for” or “against” the proposal are counted. Any broker non-votes submitted by brokers or nominees in connection with the special meeting will not be counted as votes “for” or “against” for determining the number of votes cast and will not be treated as present for quorum purposes. For purposes of determining the number of votes cast with respect to the Mid Penn adjournment proposal, only those votes cast “for” or “against” the proposal are counted. Any broker non-votes submitted by brokers or nominees in connection with the special meeting are not counted for purposes of the Mid Penn share issuance proposal or the Mid Penn adjournment proposal and thus have no effect on the outcome of either proposal. If your bank, broker, trustee or other nominee holds your shares of Mid Penn common stock in “street name,” such entity will vote your shares of Mid Penn common stock only if you provide instructions on how to vote by complying with the voting instructions form sent to you by your bank, broker, trustee or other nominee with this joint proxy statement/prospectus. Q: What constitutes a quorum for the Mid Penn special meeting? A: As of the Mid Penn record date, 19,355,797 shares of Mid Penn common stock were issued and outstanding, each of which will be entitled to one vote at the meeting. Under Mid Penn’s bylaws, the presence, in person or by proxy, of shareholders entitled to cast at least a majority of the votes that all shareholders are entitled to cast constitutes a quorum for the transaction of business at the special meeting. If you vote by proxy, your shares will be included for determining the presence of a quorum. Abstentions are also included for determining the presence of a quorum. If you fail to submit a proxy prior to the special meeting or to vote at the Mid Penn special meeting, your shares of Mid Penn common stock will not be counted towards a quorum. Q: Assuming the presence of a quorum, what is the vote required to approve the matters to be considered at the Mid Penn special meeting? A: The affirmative vote of a majority of votes cast, in person or by proxy, at the Mid Penn special meeting is required to approve the Mid Penn share issuance proposal and the Mid Penn adjournment proposal. Abstentions will not affect the outcome of either of such proposals. Q: Do I have appraisal or dissenters’ rights? A: No. Under Pennsylvania law, holders of Mid Penn common stock will not be entitled to exercise any appraisal rights in connection with the merger. Q: Can I attend the Mid Penn special meeting and vote my shares virtually? A: Yes. All shareholders, including shareholders of record and those who hold their shares through banks, brokers, nominees or any other holder of record, are invited to virtually attend the special meeting. Holders of record of Mid Penn common stock can vote virtually at the special meeting. If you are not a shareholder of record, you must obtain a proxy, executed in your favor, from the record holder of your shares, such as a broker, bank or other nominee, to be able to vote at the special meeting. If you plan to virtually attend the special meeting, you must hold your shares in your own name or have a letter from the record holder of your shares confirming your ownership. Q: Can I change my vote? A: Yes. You may revoke any proxy at any time before it is voted by (1) signing and returning a proxy card with a later date (if you submitted your proxy by Internet or by telephone, you can vote again by Internet or telephone), (2) delivering a written revocation letter to Mid Penn’s Corporate Secretary, or (3) virtually attending the special meeting, notifying the Corporate Secretary and voting at the special meeting. Mid Penn’s Corporate Secretary’s mailing address is Mid Penn Bancorp, Inc., 2407 Park Drive, Harrisburg, Pennsylvania 17110, Attention: Corporate Secretary. 6

Any shareholder entitled to vote virtually at the special meeting may vote regardless of whether a proxy has been previously given, and such vote will revoke any previous proxy, but the mere virtual presence (without notifying Mid Penn’s Corporate Secretary) of a shareholder at the special meeting will not constitute revocation of a previously given proxy. A shareholder may change his or her vote up and until the time that votes are counted but not thereafter. Q: How will proxies be solicited and who will bear the cost of soliciting votes for the Mid Penn special meeting? A: Mid Penn will bear the cost of preparing and assembling these proxy materials for the Mid Penn special meeting. The cost of printing and mailing these proxy materials will be shared equally between Mid Penn and William Penn. The solicitation of proxies or votes for the Mid Penn special meeting may also be made in person, by telephone, or by electronic communication by Mid Penn’s directors, officers, and employees, none of whom will receive any additional compensation for such solicitation activities. In addition, Mid Penn may reimburse brokerage firms and other persons representing beneficial owners of shares for their expenses in forwarding solicitation material to such beneficial owners. Q: Can additional proposals be presented at the Mid Penn special meeting? A: No. Other than the proposals described in this joint proxy statement/prospectus, no additional matters can be presented for a vote at the special meeting. Q: Are there risks that I should consider in deciding whether to vote to approve the share issuance? A: Yes. You should consider the risk factors set out in the section entitled “Risk Factors” beginning on page 39 of this joint proxy statement/prospectus. Q: What if I hold stock of both Mid Penn and William Penn? A: If you hold stock of both Mid Penn and William Penn, you will receive two separate packages of proxy materials. A vote as a Mid Penn shareholder for the Mid Penn share issuance proposal or the Mid Penn adjournment proposal will not constitute a vote as a William Penn shareholder for the William Penn merger proposal or any other proposals to be considered at the William Penn special meeting, and vice versa. Therefore, please sign, date and return all proxy cards that you receive, whether from Mid Penn or William Penn, or submit separate proxies as both a Mid Penn shareholder and a William Penn shareholder as instructed. Q: Whom should I contact if I have additional questions? A: If you are a Mid Penn shareholder and have any questions about the merger, need assistance in submitting your proxy or voting your shares of Mid Penn common stock, or if you need additional copies of this document or the enclosed proxy card, you should contact: Mid Penn Bancorp, Inc. 2407 Park Drive Harrisburg, Pennsylvania 17110 Attention: Investor Relations Telephone: (866) 642-7736 7

Questions about the William Penn Special Meeting Q: What am I being asked to vote on at the William Penn special meeting? A: William Penn shareholders of record are being asked to consider and vote on: 1. the William Penn merger proposal; and 2. the William Penn adjournment proposal. Q: How does the William Penn board of directors recommend that I vote my shares? A: The William Penn board of directors recommends that the William Penn shareholders vote their shares as follows: • “FOR” the William Penn merger proposal; and • “FOR” the William Penn adjournment proposal. As of the record date, directors and executive officers of William Penn and their affiliates had the right to vote 785,058 shares of William Penn common stock, or approximately 8.5% of the outstanding William Penn common stock entitled to be voted at the William Penn special meeting. Each of the directors and executive officers of William Penn has entered into a separate voting agreement with Mid Penn to vote all shares of William Penn common stock owned by him or her, and that he or she has the sole power to vote or direct the voting thereof, in favor of the adoption of the merger agreement. Q: What do I need to do now? A: After carefully reading and considering the information contained in this joint proxy statement/prospectus, please submit your proxy as soon as possible so that your shares will be represented at the William Penn special meeting. Please follow the instructions set forth on the proxy card or on the voting instruction form provided by the record holder if your shares are held in the name of your broker or other nominee. Q: Who is entitled to vote at the William Penn special meeting? A: William Penn shareholders of record as of the close of business on January 31, 2025, which is referred to as the “William Penn record date,” are entitled to notice of, and to vote at, the William Penn special meeting. Q: How many votes do I have? A: Each outstanding share of William Penn common stock is entitled to one vote. Q: How do I vote my William Penn shares? A: William Penn shareholders of record may vote their William Penn shares by completing and returning the enclosed proxy card, by Internet, by telephone or by voting at the William Penn special meeting. Voting by Proxy. You may vote your William Penn shares by completing and returning the enclosed proxy card. Your proxy will be voted in accordance with your instructions. If you submit a properly executed and dated proxy, but do not specify a choice on one of the proposals described in this joint proxy statement/ prospectus, your proxy will be voted in favor of that proposal. Voting by Internet. If you are a registered shareholder, you may vote electronically through the Internet by following the instructions included on your proxy card. If your shares are registered in the name of a broker or other nominee, you may be able to vote via the Internet. If so, the voting form your nominee sends you will provide Internet instructions. 8

RkJQdWJsaXNoZXIy NTYwMjI1