Serendipitous drug usage refers to unexpected relief of comorbid diseases or symptoms when patients take a drug for another common or known indication. In the history of drug discovery, serendipity has contributed significantly to new and successful indications for many drugs. Our previous research has identified patient reported serendipitous drug usage in social media. If such information could be computationally identified in social media, it could be helpful for generating and validating drug-repositioning hypotheses. In this study, we framed detection of serendipitous drug usage in social media as a binary classification problem and investigated deep neural network models as a solution. We constructed word-embedding features from drug-review posts in the patient forum of WebMD, using the word2vec algorithm. We adopted the convolutional neural network (CNN), long short-term memory network (LSTM), and convolutional long short-term memory network (CLSTM) and redesigned them by adding contextual information that we extracted from drug-review posts, information filtering tools, medical ontology, and medical knowledge. We trained, tuned, and evaluated our deep neural network models on a gold standard dataset containing 15,714 sentences, of which 447 contained serendipitous drug usages. Additionally, we compared our deep neural networks to support vector machine, random forest, and AdaBoost.M1 algorithms. The results showed that adding context information helped to reduce the false-positive rate of deep neural network models. In the presence of an extremely imbalanced dataset and limited instances of serendipitous drug usage, deep neural network models did not outperform other machine learning models with n-gram and context features. However, deep neural network models could more effectively utilize word embedding in feature construction. This advantage made deep neural networks worthy of further investigation and improvement.