In accepting a $45 billion merger proposal from Comcast Corp., Time Warner Cable Inc. is ridding itself of an unwanted suitor, but it made some financial trade-offs in the process.

The agreement marks an abrupt twist to an eight-month takeover battle for Time Warner Cable waged by Charter Communications Inc. and its biggest shareholder, Liberty Media Corp., whose chairman is cable pioneer John Malone.

Charter...