Compared to the protein 3-class secondary structure (SS) prediction, the 8-class prediction gains less attention and is also much more challenging, especially for proteins with few sequence homologs. This paper presents a new probabilistic method for 8-class SS prediction using Conditional Neural Fields (CNFs), a recently-invented probabilistic graphical model. This CNF method not only models complex relationship between sequence features and SS, but also exploits interdependency among SS types of adjacent residues. In addition to sequence profiles, our method also makes use of non-evolutionary information for SS prediction. Tested on the CB513 and RS126 datasets, our method achieves Q8 accuracy 64.9% and 64.7%, respectively, which are much better than the SSpro8 web server (51.0% and 48.0%, respectively). Our method can also be used to predict other structure properties (e.g., solvent accessibility) of a protein or the SS of RNA.