In this paper we consider a general optimal consumption-portfolio selection problem of an infinitely-lived agent whose consumption rate process is subject to subsistence constraints before retirement. That is, her consumption rate should be greater than or equal to some positive constant before retirement. We integrate three optimal decisions which are the optimal consumption, the optimal investment choice and the optimal stopping problem in which the agent chooses her retirement time in one model. We obtain the explicit forms of optimal policies using a martingale method and a variational inequality arising from the dual function of the optimal stopping problem. We treat the optimal retirement time as the first hitting time when her wealth exceeds a certain wealth level which will be determined by a free boundary value problem and duality approaches. We also derive closed forms of the optimal wealth processes before and after retirement. Some numerical examples are presented for the case of constant relative risk aversion (CRRA) utility class. (C) 2008 Elsevier Inc. All rights reserved.