Short answer. No. The Labor Code makes it unlawful to discharge a woman on account of her pregnancy, or while she is on leave or in confinement due to it. It is equally unlawful to refuse to take her back afterwards because the employer fears she may become pregnant again.
What the law says
To discharge such woman on account of her pregnancy, or while on leave or in confinement due to her pregnancy
Labor Code, Article 137 — Prohibited Acts Against Women. Read the full provision →
The prohibition covers three separate moves
Read the provision as a list of things an employer may not do, because employers rarely do the most obvious one. The first is denying a woman the benefits the law gives her, or discharging her for the purpose of preventing her from enjoying them — that is, cutting her loose just before she qualifies. The second is the direct one: discharging her because she is pregnant, or during the leave or confinement itself. The third is quieter and often missed — discharging her, or refusing to admit her back to work, when she returns, out of fear that she may be pregnant again. An employer who cannot lawfully fire a pregnant worker sometimes simply has no post for her afterwards, and the law names that too.
What an employer may still lawfully do
Pregnancy is not a shield against every dismissal. An employer may still end employment for a just or authorised cause under the Labor Code — serious misconduct, for instance, or a genuine redundancy or closure — provided the ground is real and the required procedure is followed. What the law forbids is using pregnancy as the reason, or using the leave period as the convenient moment. That is why the timing and the paper trail matter so much in practice. A dismissal announced days after you disclosed your pregnancy, or a sudden performance complaint that appears only once you file for leave, invites the question of what the real motive was. Keep every document: the notices, the evaluations that came before, the messages, the medical certificates.
Maternity leave itself is now governed by a later law
The anti-discrimination prohibition above still stands, but do not read the Labor Code chapter as the current source of the maternity benefit itself. The entitlement is now set by Republic Act No. 11210, the 105-Day Expanded Maternity Leave Law of 2019, which enlarged the leave and changed how it is availed of through the Social Security System, with additional days for solo parents and an option to transfer part of the leave. So a woman checking how many days she is owed, or how her pay is computed, should look to that statute and its rules rather than to the older provisions.
If it has already happened
Act while records are still obtainable. Ask for the dismissal in writing and for the stated ground; an employer who will not put a reason on paper is telling you something. Gather your payslips, employment contract, leave application and any correspondence about the pregnancy. Complaints of illegal dismissal are pursued through the Department of Labor and Employment or the National Labor Relations Commission, and they are subject to time limits, so delay costs options. No page can tell you how a particular case will come out — that turns on evidence — but a dismissal timed to a pregnancy is one a worker is entitled to make the employer explain.