A fixing device that is configured to fix an image formed on a recording material to the recording material at a fixing nip portion, the fixing device comprising: a flexible cylindrical rotary member that is configured to rotate while contacting the recording material on which the image has been formed; a roller that forms the fixing nip portion and that is configured to nip and to convey the recording material together with the rotary member; an inner-surface opposing portion (11c, 21c, 31c, 111c, 611c) that is configured to oppose an inner surface of the rotary member at an end portion of the rotary member in a generatrix direction, and an end-surface opposing portion (11a, 21a, 31a, 111a, 611a) that is configured to oppose an end surface of the rotary member, wherein the inner-surface opposing portion is provided movably toward an upstream side (M2, M3, M4) at the fixing nip portion in a recording material conveying direction, the end-surface opposing portion is provided movably in the generatrix direction, and wherein the fixing device is configured such that, when the rotary member is laterally shifted in the generatrix direction and pushes the end-surface opposing portion, the end-surface opposing portion moves in the generatrix direction by being pushed by the end surface of the rotary member, the inner-surface opposing portion moves to the upstream side in the recording material conveying direction at the fixing nip portion by a force for pushing the end-surface opposing portion by the rotary member, and the inner-surface opposing portion pushes the inner surface of the end of the rotary member in the generatrix direction to the upstream side in the recording material conveying direction. a flexible cylindrical rotary member that is configured to rotate while contacting the recording material on which the image has been formed; a roller that forms the fixing nip portion and that is configured to nip and to convey the recording material together with the rotary member; an inner-surface opposing portion (11c, 21c, 31c, 111c, 611c) that is configured to oppose an inner surface of the rotary member at an end portion of the rotary member in a generatrix direction, and an end-surface opposing portion (11a, 21a, 31a, 111a, 611a) that is configured to oppose an end surface of the rotary member, wherein the inner-surface opposing portion is provided movably toward an upstream side (M2, M3, M4) at the fixing nip portion in a recording material conveying direction, the end-surface opposing portion is provided movably in the generatrix direction, and wherein the fixing device is configured such that, when the rotary member is laterally shifted in the generatrix direction and pushes the end-surface opposing portion, the end-surface opposing portion moves in the generatrix direction by being pushed by the end surface of the rotary member, the inner-surface opposing portion moves to the upstream side in the recording material conveying direction at the fixing nip portion by a force for pushing the end-surface opposing portion by the rotary member, and the inner-surface opposing portion pushes the inner surface of the end of the rotary member in the generatrix direction to the upstream side in the recording material conveying direction.