In this paper we discuss the insertion task of a flexible beam into a hole when the friction force is large enough to buckle the beam. We analyze the buckling shape of the beam and external forces and moments loaded on the beam during the insertion task, under the condition that the potential energy of the beam is minimized. Then, we find that the buckling shape has two buckling modes and the modes are changed by varying the orientation angle of the end of the beam. We propose a strategy of performing the insertion task, based on an analysis of the relation between the external forces and friction coefficient. Finally we present experimental results to confirm our analysis.