An initial study showed that a number of CBEM (Computer-Based Essay Marking) systems are available in the market. By investigating lecturers'' and students'' expectations of a CBEM system, and experimenting one particular CBEM system, the results suggest that existing CBEM systems are not quite suitable for marking ESL writing at IHLs in Malaysia. Lecturers and students have certain expectations. This research has developed a framework that will serve as a software requirement for the design and implementation of the system by software developers. It describes the software requirement in terms of input, output, knowledge, and process that need to be carried out. The study has also proposed the techniques that can be used to mark essays automatically. The knowledge gained from this study will also be useful for postgraduates who are undertaking research for higher degree and researchers as they can apply the theory of writing and theory of assessment of writing in their own contexts. ESL teachers will benefit from it as they can improve the techniques of teaching for writing courses at their institutions.