This paper sets up a small open economy model with habit persistence in consumption in which distortionary taxation is available in a flexible price environment. In open economy, the habit persistence in consumption aggravates the terms of trade externality, absent in closed economy, calling for more aggressive fiscal policy. While optimal labor income taxes are time-invariant in a closed economy with internal habit, they should be time-varying in an open economy to alleviate the terms of trade externality, even if the intertemporal elasticity of substitution equals the intratemporal elasticity of substitution. In a small open economy composed of households with habit persistence in consumption, households’ decision to gradually adjust their consumption and labor hours intensifies the undesirable terms of trade externality or the terms of trade channel. This generates a time-varying wedge between the efficiency conditions of the Ramsey planner and the market equilibrium conditions, calling for a time-varying taxation which takes into account the intertemporal elasticity of substitution and the intratemporal elasticity of substitution between home and foreign goods, in addition to the degree of habit and goods market distortion. The volatility of optimal tax rate increases with the degree of habit, whether households have external or internal habit. The volatility of tax rate shows an inverted U-shape in the degree of openness in the small open economy with habit. Finally, the optimal labor income tax rate moves countercyclically for low degree of intratemporal elasticity of substitution, while it moves procyclically for high degree of intratemporal elasticity of substitution.