The beam vertical mode of buckling and beam lateral mode of buckling of offshore pipelines were investigated. The pipeline was modeled as an elasto-plastic, infinitely long beam with localized imperfection. The seabed was modeled as a fluid-saturated, layered porous medium. The boundary element method, finite element method, and finite difference method were applied for the numerical study. The results show that the buckling behavior of beam vertical mode and beam lateral mode is essentially influenced by the buried depth, initial imperfection, and incline angle. The pipe tends to buckle in the beam lateral mode for the pipe with shallower buried depth, larger imperfection height, and smaller incline angle. The critical buried depth that separates beam vertical mode and beam lateral mode is shallower for smaller excess pore pressure.