Dwivedi (or Dubey) is a Hindu surname. Dwivedis belong to the Brahmin caste, and belong to the Pancha Gauda classification of Brahmins (i.e. north India brahmins). Dwivedis can belong to any of the five gauds: Kanyakubja,Saraswat, Maithil, Gauda, and Utkala Brahmins,surname also found among Saryupareen Brahmins & Bhumihar Brahmins.but mainly tend to be Kanyakubja (Saryupareen_Brahmins).
Historically, Dwivedis were known for their great role in preserving and distributing knowledge. They were called "Mahavidwan" among brahmins and were well versed in all sorts of arts. As brahmins, they would be consulted by rajas and the ruling class on important decisions.
Read more about Dwivedi: Etymology, Distribution, Notable People With The Surname Dwivedi