Sentence writing is inevitably needed in order to be able to write a longer text because the mastery of writing various types of sentences will facilitate writers to produce a good writing style. However, writing accurate sentences constitute problems for many EFL learners. One way to solve the problems is finding out a teaching strategy that can help the students to learn sentence writing more effectively. This study is an attempt to develop a strategy to teach sentence writing, aiming at knowing the effectiveness of text analysis to enhance the students’ competence to write accurate sentences. An experiment was done in a classroom context by comparing the sentence writing accuracy of the students taught with a teaching strategy covering text analysis (experimental group) and that of the students taught with a teaching strategy without text analysis (control group). The study revealed that there is significant difference between the sentence writing accuracy of the students in the experimental group and that of the students in the control group. The students of the experimental group outperformed those of the control group. It means that text analysis is effective to develop EFL students’ sentence writing accuracy. This is because text analysis is one way to learn grammar; it also strengthens the concept the students have learned. Based on this conclusion, it is suggested that a writing teacher ask the students to do text analysis in teaching sentence writing.