The closing plug and the closing plug device are used for closing a body defect percutaneously. During the insertion into the defect, the closing plug can be deformed to a smaller size to facilitate the insertion operation and recovered to its original larger shape after it is fitted to the defect, to thereby close the defect. The closing plug device facilitates the insertion of the closing plug into the defect. The closing plug has a flange or an enlarged portion at least at one end thereof and is made of a shape memory polymer having a shape recovery temperature in the range of 20.degree. C. to 70.degree. C. The closing plug device comprises a closing plug, a catheter and a guide wire or a pushing wire to aid in insertion of the closing plug to a defect.