This study analyzes the compositions of Hong Kong English as a second language (ESL) learners and English as a foreign language (EFL) learners in Mainland China in terms of lexical and syntactic features. A program based on the CoreNLP was developed and used to analyze written language texts, and differences in tags of parts of speech and syntactic dependencies between the two groups of texts were compared statistically to examine differences in the lexical and syntactic features of the learners’ written language. The results show significant differences in the lexical and syntactic features of learners’ writing. Specifically, in EFL learners’ writing, there is a salient group pattern of higher lexical diversity, whereas ESL compositions are more flexible in vocabulary use with higher information density, in that they use more syntactic phrases and content words. In terms of syntax, Hong Kong ESL students use more adverbials and adverbial clauses, which is advantageous in syntactic simplicity and readability over their counterparts, whereas Mainland China EFL students prefer using more specific expressions to demonstrate syntactic relations. Compared to EFL compositions, ESL compositions are more informative, coherent, and grammatical in lexical features and more readable in syntactic features, which require more attention and further improvements in terms of EFL teaching.