In order to implement the education policy and the fundamental task of establishing morality and cultivating people, this paper analyzes the implementation strategy of ideological and political education in computer basic courses, and discusses the implementation path of the education policy of establishing morality and cultivating people for war in computer basic courses in combination with relevant cases, so as to provide some reference and ideas for the relevant teaching of computer basic courses in military universities.