By shifting the balance between conformational entropy and internal energy, polymers modify their shape under external stimuli, such as changes in temperature. Prominent among such transformations is the coil-globule transition, whereby a polymer can switch from an entropydominated coil conformation to a globular one, governed by energy. The nature of the coilglobule transition has remained elusive, with evidence for both continuous and discontinuous transitions, with the two-state behaviour of proteins as an instance of the latter. Theoretical models mostly predict second-order transitions. Here we introduce a model that takes into consideration hitherto neglected features common to any polymer. We show that a firstorder phase transition smoothly appears as a function of the model parameters. our results can relieve part of the conflicts between theory and experiments in the field of protein folding, in the wake of recent studies tracing back the remarkable properties of proteins to basic polymer physics.