Abstract:It is a new measure and attempt of ideological and political education in China in recent years to promote the mutual integration of professional courses and ideological and political courses, to integrate ideological and political education into the whole process of professional education , and to give full play to the educational role of each course. It is also an important task to improve the quality of talent training in an all-round way.In civil engineering major,the core course of Soil Mechanics was specialized as an example. According to the educational target orientation of civil engineering major and the ideological education goal of Soil Mechanics course, clarified the course system, determined the construction path of curriculum-based ideological and political education, excavated deeply the the relationship between the course content and ideological elements, condensed the typical engineering cases and integrated them into the daily teaching. the students mastered professional knowledge. at the same time, they obtained the influence of the education of socialist core values. It is achieved that "knowledge" and "value guidance" as a mutual integration. Curriculum-based ideological and political education becomes an effective complement and auxiliary force for ideological and political education.