This paper studies the optimal consumption via the habit formation preference in markets with transaction costs and unbounded random endowments. To model the proportional transaction costs, we adopt the Kabanov's multi-asset framework with a cash account. At the terminal time T , the investor can receive unbounded random endowments for which we propose a new definition of acceptable portfolios based on the strictly consistent price system (SCPS). We prove a type of super-hedging theorem using the acceptable portfolios which enables us to obtain the consumption budget constraint condition under market frictions. Following similar ideas in [32] with the path dependence reduction and the embedding approach, we obtain the existence and uniqueness of the optimal consumption using some auxiliary processes and the duality analysis. As an application of the duality theory, the market isomorphism with special discounting factors is also discussed in the sense that the original optimal consumption with habit formation is equivalent to the standard optimal consumption problem without the habits impact, however, in a modified isomorphic market model.1. Introduction. The study of consumption habit formation in financial economics dates back to [15] and [28]. It has been observed that the von Neumann-Morgenstern utilities can not reconcile the well-known magnitude of the equity premium (See [25] and [4]). Instead, the habit formation preference takes care of both the current consumption choice and its history pattern. Due to its time non-separable structure, a small change in the consumption can cause a large fluctuation in consumption net of the subsistence level, which may explain the sizable excess returns on risky assets in equilibrium models. Likewise this new preference can shed some light on the quantitative explanation of consumer's psychology in the context of the consumption behavior with investment opportunities. For instance, many empirical studies and psychological reports reveal that the consumer's satisfaction level and risk tolerance sometimes rely more on recent changes than the absolute levels. This preference has thereby been a surge in models for which the smooth consumption is more beneficial than the marked increase, such as the household consumption and other types of expenditures with commitment. In addition, as pointed out in [11], habit formation allows the model to match the response of real spending to monetary policy shocks and this new preference can also more accurately replicate the gradual decline of inflation during a disinflation. The diverse applications of this path-dependent preference motivate our research in general incomplete market models.