A nonlinear equation of the Korteweg–de Vries equation usually describes internal solitary waves in the coastal ocean that lead to an exact solitary wave solution. However, in any real application, there exists the Earth’s rotation. Thus, an additional term is required, and consequently, the Ostrovsky equation is developed. This additional term is believed to destroy the solitary wave solution and form a nonlinear envelope wave packet instead. In addition, an internal solitary wave is commonly disseminated over the variable topography in the ocean. Because of these effects, the Ostrovsky equation is retrieved by a variable-coefficient Ostrovsky equation. In this study, the combined effects of both background rotation and variable topography on a solitary wave in a two-layer fluid is studied since internal waves typically happen here. A numerical simulation for the variable-coefficient Ostrovsky equation with a variable topography is presented. Two basic examples of the depth profile are considered in detail and sustained by numerical results. The first one is the constant-slope bottom, and the second one is the specific bottom profile following the previous studies. These indicate that the combination of variable topography and rotation induces a secondary trailing wave packet.