Abstract: Provided is a one-piece carton having a child-resistant function comprising a box body, which is a cuboid and comprises an accommodation cavity inside; wherein one side of the accommodation cavity is provided with an opening; the box body is provided with a locking piece and a closure panel; the locking piece comprises a pair of clamping pieces that expand outward and are foldably attached to the locking piece; the opening of the accommodation cavity is provided with a pair of engaged parts; and the box body is provided with pressing pieces corresponding to the clamping pieces.