Ambient conditions can have a significant impact on the average and maximum temperature of the battery of electric and plug-in hybrid electric vehicles. Given the sensitivity of the ageing mechanisms of typical battery cells to temperature, a significant variability in battery lifetime has been reported with geographical location. In addition, high battery temperature and the associated cooling requirements can cause poor passenger thermal comfort, while extreme battery temperatures can negatively impact the power output of the battery, limiting the available electric traction torque. Avoiding such issues requires enabling battery cooling even when the vehicle is parked and not plugged in (key-off), but the associated extra energy requirements make applying key-off cooling a non-trivial decision. In this paper, a representative plug-in parallel hybrid electric vehicle model is used to simulate a typical 24-h duty cycle to quantify the impact of hot ambient conditions on three performance attributes of the vehicle: the battery lifetime, passenger thermal comfort and fuel economy. Key-off cooling is defined as an optimal control problem in view of the duty cycle of the vehicle. The problem is then solved using the dynamic programming method. Controlling key-off cooling through this method leads to significant improvements in the battery lifetime, while benefiting the fuel economy and thermal comfort attributes. To further improve the battery lifetime, partial charging of the battery is considered. An algorithm is developed that determines the optimum combination of key-off cooling and the level of battery charge. Simulation results confirm the benefits of the proposed method.