Lignocellulosic biomass such as barley straw is a renewable and sustainable alternative to traditional feeds and could be used as bioenergy sources; however, low hydrolysis rate reduces the fermentation efficiency. Understanding the degradation and colonization of barley straw by rumen bacteria is the key step to improve the utilization of barley straw in animal feeding or biofuel production. This study evaluated the hydrolysis of barley straw as a result of the inoculation by rumen fluid of camel and sheep. Ground barley straw was incubated anaerobically with rumen inocula from three fistulated camels (FC) and three fistulated sheep (FR) for a period of 72 h. The source of rumen inoculum did not affect the disappearance of dry matter (DMD), neutral detergent fiber (NDFD). Group FR showed higher production of glucose, xylose, and gas; while higher ethanol production was associated with cellulosic hydrolysates obtained from FC group. The diversity and structure of bacterial communities attached to barley straw was investigated by Illumina Mi-Seq sequencing of V4-V5 region of 16S rRNA genes. The bacterial community was dominated by phylum Firmicutes and Bacteroidetes. The dominant genera were RC9_gut_group, Ruminococcus, Saccharofermentans, Butyrivibrio, Succiniclasticum, Selenomonas, and Streptococcus, indicating the important role of these genera in lignocellulose fermentation in the rumen. Group FR showed higher RC9_gut_group and group FC revealed higher Ruminococcus, Saccharofermentans, and Butyrivibrio. Higher enzymes activities (cellulase and xylanase) were associated with group FC. Thus, bacterial communities in camel and sheep have a great potential to improve the utilization lignocellulosic material in animal feeding and the production of biofuel and enzymes.