The trellis coding technique is applied to line-coded baseband digital transmission systems. For R = n/n + 1(n = 1, 2, 3) coding rates, a new codeword assignment model is proposed to accomplish basic requirements for line coding in which each length n binary data sequence is encoded into a length n + 1 ternary (+, 0, -) line codeword chosen among the code alphabet with 2n+2 elements. Assuming Viterbi decoding, the system error performance is improved by increasing the free Euclidean distance between coded sequences. A new algorithm is given for the calculation of the free distance between line-coded sequences so obtained. For R = 1/2 and R = 3/4 rates, the analytical error performance upper bounds are derived. The power spectral densities of the new line codes are also calculated and compared with those of known line codes.