Functionally characterized lncRNAs play critical roles in cancer progression but the potential relationship between lncRNAs and herbal medicine is yet to be known. To identify this association by RNA‐seq data for breast and prostate cancer, a co‐expression network in response to herbal medicines was performed. GO terms and pathway analyses on differential co‐expressed mRNAs revealed that lncRNAs were widely co‐expressed with metabolic process genes. On the other hand, various machine learning‐based prediction systems on the differential co‐expressed lncRNAs were implemented. Results show that the Deep Learning model could accurately forecast cancer‐related lncRNAs.BackgroundAccumulating evidence shows that long non‐coding RNAs (lncRNAs) play critical roles in cancer progression. The possible association between lncRNAs and herbal medicine is yet to be known. This study aims to identify medicinal herbs associated with lncRNAs by RNA‐seq data for breast and prostate cancer.MethodsTo develop the optimal approach for identifying cancer‐related lncRNAs, we implemented two steps: (1) applying protein–protein interaction (PPI), Gene Ontology (GO), and pathway analyses, and (2) applying attribute weighting and finding the efficient classification model of the machine learning approach.ResultsIn the first step, GO terms and pathway analyses on differential co‐expressed mRNAs revealed that lncRNAs were widely co‐expressed with metabolic process genes. We identified two hub lncRNA‐mRNA networks that implicate lncRNAs associated with breast and prostate cancer. In the second step, we implemented various machine learning‐based prediction systems (Decision Tree, Random Forest, Deep Learning, and Gradient‐Boosted Tree) on the non‐transformed and Z‐standardized differential co‐expressed lncRNAs. Based on five‐fold cross‐validation, we obtained high accuracy (91.11%), high sensitivity (88.33%), and high specificity (93.33%) in Deep Learning which reinforces the biomarker power of identified lncRNAs in this study. As data originally came from different cell lines at different durations of herbal treatment intervention, we applied seven attribute weighting algorithms to check the effects of variables on identifying lncRNAs. Attribute weighting results showed that the cell line and time had little or no effect on the selected lncRNAs list. Besides, we identified one known lncRNAs, downregulated RNA in cancer (DRAIC), as an essential feature.ConclusionsThis study will provide further insights to investigate the potential therapeutic and prognostic targets for prostate cancer (PC) and breast cancer (BC) in common.